I am trying to find the shortest and longest string value based on length and im getting stuck. As of now the script exits after the writeline. I think the code needs some h
Linq is the way to go here to make your life a lot easier...
var sorted=word.OrderBy(n => n.Length); var shortest = sorted.FirstOrDefault(); var longest = sorted.LastOrDefault();