Linq Query:
Output:
//Average Projection string[] words = { "GodOfWar", "CallOfDuty", "AssasinCreed" }; double avgWordLeng = words.Average(w => w.Length); Console.WriteLine("Average word Length is {0} characters long.", avgWordLeng); //
Output:
Average word Length is 10 characters long.
0 comments:
Post a Comment