Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string s = "abcdefghab";
- s.ToCharArray().OrderBy(a => a)...
- String text = "dssdfsfadafdsaf";
- var repeatedChars = text.ToCharArray().GroupBy(x => x).Where(y => y.Count() > 1).Select(z=>z.Key);
- string theString = "abcdefghab";
- //C# query syntax
- var qry = (from c in theString.ToCharArray()
- group c by c into g
- where g.Count() > 1
- select g.Key);
- //C# pure methods syntax
- var qry2 = theString.ToCharArray()
- .GroupBy(c => c)
- .Where(g => g.Count() > 1)
- .Select(g => g.Key);
- var qry = (from c in theString
- group c by c into g
- where g.Count() > 1
- select g.Key);
Add Comment
Please, Sign In to add comment