> This is a prototype that can be in my text file.My web service will have to
> read the content of the file and will have to store it in a string[] as given below
It sounds to me like you want to split the data into substrings that are
separated by either | or a line break. A line break is most likely vbNewLine
or vbLf. So, load the text file into string s and do operations as follows:
Dim s as string
' load the file into string s
s = Replace(s, vbLf, "|") ' possibly, vbLf should be vbNewLine
Dim a() as string
a = Split(s, "|")
At this point, a() will contain your substrings. It sounds also like you
are using C#, but my code fragment is in basic. Sorry about that. But the
idea is still fairly simple. You want to use Split() to break the text into
tokens based on a separator, and it appears that you have two separators.
|