0

I built a simple client/server in C#. I am trying to figure out how to take the data received from socket and parse it according to the client protocol (where ever there is a comma (,)) then store it to a variable in a class. How do you take the data stream and search for the delimiter, have the program store what it has read up until the delimter then continue until the next and repeat. I would imagine there is some type of for loop invloved.

data stream - secureID,emailaddress,phonenumber

Then store it to m.secureID m.Email m.phone

thanks

3
  • You ask a lot of different things.. At least, I can suggest you to use either XML or JSON instead of your own format. That would allow you to avoid writing your own parser and would ease integration with other systems, if that is a possible case for you. Commented Oct 20, 2014 at 14:08
  • possible duplicate of CSV to object model mapping Commented Oct 20, 2014 at 15:10
  • Duplicate for the second part, but I'm sure the first part (about sockets) has been asked too. Commented Oct 20, 2014 at 15:11

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.