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

Greg G
  • 11
  • 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. – AndreySarafanov Oct 20 '14 at 14:08
  • possible duplicate of [CSV to object model mapping](http://stackoverflow.com/questions/3497699/csv-to-object-model-mapping) – Arturo Torres Sánchez Oct 20 '14 at 15:10
  • Duplicate for the second part, but I'm sure the first part (about sockets) has been asked too. – Arturo Torres Sánchez Oct 20 '14 at 15:11

0 Answers0