split at \ c# code example
Example 1: split using string c#
//Split using a string delimiter instead of a char
data.Split(new string[] { "xx" }, StringSplitOptions.None);
Example 2: string split c#
char[] delimiterChars = { ' ', ',', '.', ':', '\t' };
string text = "one\ttwo three:four,five six seven";
System.Console.WriteLine($"Original text: '{text}'");
string[] words = text.Split(delimiterChars);
System.Console.WriteLine($"{words.Length} words in text:");
foreach (var word in words)
{
System.Console.WriteLine($"<{word}>");
}