How To Parse A String In C# Code Example

Snippet 1
  string phrase = "The quick brown    fox     jumps over the lazy dog.";
string[] words = phrase.Split(' ');

foreach (var word in words)
{
    System.Console.WriteLine($"");
}
 
Snippet 2
  //Split using a string delimiter instead of a char
data.Split(new string[] { "xx" }, StringSplitOptions.None);