Linq Query:
Output:
//
string[] words = { "GodOfWar", "CallOfDuty", "AssasinCreed" };
int LargestWord = words.Max(w => w.Length);
Console.WriteLine("The largest word is {0} characters long.", LargestWord);
//
Output:
The largest word is 12 characters long.

0 comments:
Post a Comment