quick off the cuff starter solution:
using System;
public class Program
{
public static void Main()
{
Console.WriteLine("The longest string is:");
Console.WriteLine(theLongestString(_stringarray));
}
private static string[] _stringarray = new string[]{"fish", "dish", "squish", "a"};
private static string theLongestString (string[] aStringArray) {
string current = "";
foreach (string str in aStringArray){
if (current.Length < str.Length) {
current = str;
}
}
return current;
}
}