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.
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 attend5days leftRegister
Raja TRank #685 · 3.5K reputationPosted Feb 27, 2016, 10:01 PM EST
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? ??
Marius Cochinescu3 reputationPosted Feb 27, 2016, 10:16 PM EST
ali tuncerRank #1,499 · 1.1K reputationPosted Feb 28, 2016, 3:20 PM EST
use String.Split method:
string msg = "Msg1 = aaa";
Console.WriteLine(msg.Split(' ')[2]);