i have 1 2 : 3 , now i have to remove the ":" , after that need split it .
i had already success to remove the ":".
now my problem is 1 2 3, i just wan to split the 3 only.
after split the 3, 1 2 still maintain.
i wan the output is shown below :
1 2 3
1 2
3
May i know to to split the 3 only?
Loading
Suthish NairPosted Mar 31, 2011, 1:10 PM
y sPosted Mar 29, 2011, 4:20 PM
Raja KrishnamurthyPosted Mar 29, 2011, 3:28 PM
@YS please try this:
string str = ( "12:3");
string[] ss = str.Replace(":","").Split(' ')
ss[0] // will equal 1
ss[1]// will equal 2
ss[2]//will equal 3
HTH.
Happy Programming!!!
Regards,
Raja
FroglegPosted Mar 29, 2011, 2:52 PM
VulpesPosted Mar 29, 2011, 2:33 PM
It's just a matter of putting it together:
y sPosted Mar 29, 2011, 1:53 PM
1 2
3
not 1 2
3
FroglegPosted Mar 29, 2011, 1:16 PM
string[] ss = str.Split(':')
ss[0] // will equal 12
ss[1]// will equal 3