Click here to Skip to main content
Sign Up to vote bad
good
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..............
 
Flexi
SrNo  TV11010300454537
SubId  1048589838
SubName  Satya
Usage Value  250.0
BP  5256.0
Posted 5 Jan '11 - 0:14
Edited 5 Jan '11 - 1:04

Comments
Estys - 5 Jan '11 - 6:20
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"?

2 solutions

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.
  Permalink  
Comments
Espen Harlinn - 5 Jan '11 - 6:21
5+ Kip it simple ... you know the rest :)
Abhinav S - 5 Jan '11 - 6:37
Good answer - however, i dont think this is what the OP is asking.
Rajesh Puli - 5 Jan '11 - 6:38
Good answer
Kasson - 5 Jan '11 - 6:23
good call my 5 too.
Dalek Dave - 5 Jan '11 - 6:26
So simple even I get it! Have another 5 for clarity!
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
  Permalink  

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

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 OriginalGriff 360
1 Sergey Alexandrovich Kryukov 173
2 Abhinav S 168
3 Guirec Le Bars 120
4 Mahesh Bailwal 115
0 Sergey Alexandrovich Kryukov 8,439
1 OriginalGriff 6,681
2 CPallini 3,553
3 Rohan Leuva 2,793
4 Maciej Los 2,234


Advertise | Privacy | Mobile
Web04 | 2.6.130516.1 | Last Updated 5 Jan 2011
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid