c# split string in lines code example
Example 1: c# split string
string sentence = "Hello Beautiful World";
string[] words = sentence.Split(' ');
foreach (string word in words) {
print(word);
}
Example 2: how to split a string by in c#
char[] separator = new[] { ',' };
var result = aiTranslatedString.Split(separator, StringSplitOptions.RemoveEmptyEntries).ToList();