public static void Main()
var longestWord = returnLongestWord(new []{ "word1", "word12", "word1234", "mostdefinitelythelongestword!", "aShorterWord", "anotherShortWordThanTheMax"});
Console.WriteLine("\nDone - longest word: " + longestWord);
public static string returnLongestWord(string[] words)
string largestWordFound = string.Empty;
foreach (var word in words)
if (word.Length > largestWordFound.Length)
Console.WriteLine("Largest word length: " + largestWordFound.Length + ", for word:\t " + largestWordFound);