Linq Query:
Output:
//Sum Projection string[] s = { "abc", "abcd", "ab", "a" }; int totalChars = s.Sum(n => n.Length); Console.WriteLine(totalChars); //
Output:
10
0 comments:
Post a Comment