Is there a better way getting the first element of IEnumerable type of this:
foreach (Image image in imgList) { picture.Width = (short)image.Columns;
The extension .First() will grab the first item in an enumerable. If the collection is empty, it will throw an exception. .FirstOrDefault() will return a default value for an empty collection (null for reference types). Choose your weapon wisely!
.First()
.FirstOrDefault()