I get the string below, through a response.StreamReader
:
240144|000|5511946724649|2015-08-30 21:45:51|2015-08-30 21:46:02|1|
How do I proceed to store the contents between the pipes each in a variable?
I get the string below, through a response.StreamReader
:
240144|000|5511946724649|2015-08-30 21:45:51|2015-08-30 21:46:02|1|
How do I proceed to store the contents between the pipes each in a variable?
Use Split()
:
var items = texto.Split('|');
This will generate an array , if you want to grab each element and place in each variable you want. This is even a manual job.
See an example working on dotNetFiddle .