0

hey guys need some help in string manipulation, example i have a string LFname = "Hello, world" and textbo1,textbo2. now i want to display "Hello" in textbox1 and display "world" in textbox2. by the way guys thanks for your patience :)

2
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by auwi987
0

The easiest way would probably be split and trim:

string[] parts = LFname.Split(',');

if (parts.Length != 2) {
    // Handle unexpected input
}

textbox1.Text = parts[0].Trim();
textbox2.Text = parts[1].Trim();
0

by the way narue you mean "hello, world" will be seperated ?

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.