2
I receive the string below, through a response.StreamReader
:
240144|000|5511946724649|2015-08-30 21:45:51|2015-08-30 21:46:02|1|
How should I proceed to store the content between the Pipes each in a variable?
2
I receive the string below, through a response.StreamReader
:
240144|000|5511946724649|2015-08-30 21:45:51|2015-08-30 21:46:02|1|
How should I proceed to store the content between the Pipes each in a variable?
7
Use the Split()
:
var items = texto.Split('|');
This will generate a array, if you want to take each element and put it in each variable you want. This is a really manual job.
Behold working in the ideone. And in the .NET Fiddle. Also put on the Github for future reference.
Browser other questions tagged c# .net string
You are not signed in. Login or sign up in order to post.