Musings
Public · Protected · Private
Find words in a sentense
-
2012-07-18 11:21// delaing with words IEnumerable wordsAll = from word in "The quick brown fox jumps over the lazy dog" .Split() // split to words .Distinct() // find distinct orderby word // in dictionary order select word; // select all words foreach (string a in wordsAll) Console.WriteLine(a);
-
2012-07-18 11:21// dealing with characters IEnumerable charsAll = from character in "The quick brown fox jumps over the lazy dog" .ToCharArray() // split to characters .Distinct() // find distinct orderby character // in sorted order select character; // select all characters foreach (char a in charsAll) Console.WriteLine(a.ToString());
This blog is frozen. No new comments or edits allowed.