I have a file named setup.txt. In setup.txt exists 3 lines:
Msg1 = aaa
Msg2 = bbb
Msg3 = ccc
How I can show in textBox1 Msg1 after " = " (textBox1.Text must be "aaa", without "Msg1 = ") ?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
ali tuncerPosted Feb 28, 2016, 8:20 PM
use String.Split method:
string msg = "Msg1 = aaa";
Console.WriteLine(msg.Split(' ')[2]);
Marius CochinescuPosted Feb 28, 2016, 3:16 AM
Raja TPosted Feb 28, 2016, 3:01 AM
Please explain clearly. U mean read the setup.txt file 3 lines text after u can assign to text box???
Msg1 means text box1 text is aaa
Msg2 means text box2 text is bbb
Msg3 means text box3 text is ccc
Pls describe ur question clearly? ??