Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
my requirement is to declare the string which are in line by lined message is it possible if possible anyboby send the code please.....

my requirement is how to dclare the above 6 lines as "6 strings",,, becose i want use that lines some of times in programe

the message is..............

MSIL
Flexi
SrNo  TV11010300454537
SubId  1048589838
SubName  Satya
Usage Value  250.0
BP  5256.0
Posted
Updated 5-Jan-11 1:04am
v6
Comments
Estys 5-Jan-11 6:20am    
Is this the same question you posted a few minutes ago? That's a bad habit, edit the original question otherwise we get lost.
What do you mean "is it possible"?

Yes, it's solvable. Use string.Split("\r\n") to split the string into a string array, and then you can process the array elements.
 
Share this answer
 
Comments
Espen Harlinn 5-Jan-11 6:21am    
5+ Kip it simple ... you know the rest :)
Kasson 5-Jan-11 6:23am    
good call my 5 too.
Dalek Dave 5-Jan-11 6:26am    
So simple even I get it! Have another 5 for clarity!
Abhinav S 5-Jan-11 6:37am    
Good answer - however, i dont think this is what the OP is asking.
Rajesh Anuhya 5-Jan-11 6:38am    
Good answer
You can have strings line by line (in one string).
You will do something like
string myString = "Flexi" + "SrNo" + "\t" + "TV11010300454537" + "\n" + "SubId" + "\t" + "1048589838" + "\n" + ....//and so on
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900