Trying to find the longest and shortest line in a text file. Longest returns correct but the shortest is always blank, any ideas?
var lines = System.IO.File.ReadLines(@"C:\test.txt");
var Minimum = "";
var Maximum = "";
foreach (string line in lines)
{
if (Maximum.Length < line.Length)
{
Maximum = line;
}
if (Minimum.Length > line.Length)
{
Minimum = line;
}
}