// Suppose textbox = "First Last" string s = textbox.Text ; string[] name= s.Split(' '); if(name.Length==2) { string firstname = name[0]; string lastname = name[1]; }
string inp = "Mike Jones"; string[] parts = inp.Split(' ');
String Name = "first last"; String[] Spilted = Name.Split(new string []{" "}, StringSplitOptions.RemoveEmptyEntries); String firstName = Spilted[0]; String lastName = Spilted[1];
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)