hello again,
i need help in concatening string <001089< :122003396: 3240058971<
and the should be like
numbe1=001089
number2=122003396
number3=3240058971
guyz help me plzzz.
thanks n regrds
kumar
hello again,
i need help in concatening string <001089< :122003396: 3240058971<
and the should be like
numbe1=001089
number2=122003396
number3=3240058971
guyz help me plzzz.
thanks n regrds
kumar
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Al Mamun3 reputationPosted Nov 21, 2007, 10:14 PM EST
In C# it is very easy to concate strings using "+" operator.
if there is or are problem(s) then use "()" and then use "+";
for example:
string n1="125000";
string n2="230222";
string n3="Hello";
string n4 = (n1+n2)+n3;
Best Regards,
Abdullah Al Mamun
AlanRank #669 · 3.6K reputationPosted Nov 21, 2007, 11:51 PM EST
Judging by his previous thread, I think Kumar is in fact talking here about string parsing ( breaking it up) as opposed to concatenation (putting it together).
If that's the case, then this code should do it:
using System;
class Test
{
static void Main()
{
string s = "<001089< :122003396: 3240058971<";
s = s.Replace("<","").Replace(" ","");
string[] sa = s.Split(':');
for(int i = 0; i < sa.Length; i++)
{
Console.WriteLine("Number{0}={1}", i+1, sa[i]);
}
Console.ReadKey();
}
}
s kumar18 reputationPosted Nov 22, 2007, 2:04 AM EST
hello guyz,
i am sorry guyz i really meant string parsing. thanks for ur support. especially thanks to Alan