string input = "044-12345678"; string pattern = "-"; // Split on hyphens string[] substrings = Regex.Split(input, pattern); foreach (string match in substrings) { Console.WriteLine("'{0}'", match); }
string myString = "123-4567890"; string[] parts = myString.Split("-");
parts[0]
parts[1]
textbox1.text=mystring.split('-')[0]; textbox2.text=mystring.split('-')[1];
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)