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
If you use LINQ, using Max/Min method is a better way than sorting.
var longest = word.Max(s=>s.Length); var shortest = word.Min(s=>s.Length);