var key = bindingList.Select((item, index) => new {item})
.Where(x => x.item.Description == description)
.Select(x => x.item.Key)
.First();
I know that I can use FirstOrDefault() avoiding the exception but the default in this case (int 0) is not what I want, I need a -1 as a default. Is there any other way to do this without actually catching the exception?
Thanks, Mihail