i have got a little problem i received some data and show it in textbox to invoke it i used
if (textBox1.InvokeRequired)
{
// this is worker thread
updatetextBoxDelegate del = new updatetextBoxDelegate(updatetextBox);
textBox1.Invoke(del, new object[] { data });
}
my data is like
name:sam
age:10
now i want to split it and save these values in array or show in sperate textboxes
i used replace method like
string str = textBox1.text;
str.Replace("name","");
and so on but the problem is replace method is not working on it it doses not replace any thing
tell me what i am doing wrong
If you look here: http://msdn.microsoft.com/en-us/library/fk49wtc1.aspx, you’ll see the
Replacemethod returns a string you have to “catch” it, so replace:with