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)

Snippet 2

  //Split using a string delimiter instead of a char
data.Split(new string[] { "xx" }, StringSplitOptions.None); 

Copyright © Code Fetcher 2020




Leave a comment

Your email address will not be published. Required fields are marked *