"csharpula csharp" <cs*******@yahoo.comwrote in message
news:e$**************@TK2MSFTNGP03.phx.gbl...
That is not helping,I still get an empty string. Maybe it's because my
start index in Insert is 0?
*** Sent via Developersdex http://www.developersdex.com ***
It works just fine for me.
Here is a sample using the idea behind Jianwei's reply:
string arg = "test";
string name = "";
name = name.Insert(name.Length, arg);
Console.WriteLine(name);
The Insert method of the string class is a method that returns the resulting
string. It does not modify the string you are inserting into, but instead
returns the string with the inserted value in it.
Just like all methods of the string class, the original string doesn't
change.
HTH,
Mythran