string.insert() broken in C#?

Started by
1 comment, last by Calin 17 years, 6 months ago
string foo = "foo"; string boo = "boo"; foo.Insert(2, boo); textBox1.Text = foo; I'm getting "foo". Thanks.

My project`s facebook page is “DreamLand Page”

Advertisement
The C# strings are immutable; they cannot be modified. The manipulation methods therefore return a new modified string:

foo = foo.Insert(2, boo);
oh, Thanks

My project`s facebook page is “DreamLand Page”

This topic is closed to new replies.

Advertisement