What is best way to return the count of the smallest/largest array in C# 4.0? preferably using Lambda expressions.
I’m looking for a way to return the count of the smallest array within a list of arrays which would usually contain 5-10 elements. I could go for the usual foreach array > get count > if larger > override > next.. etc. but was hoping for a one-line solution using LINQ/Lambda.
Something like this?
That will find the length of each array, and return the minimum length. If that’s not what you’re after, please clarify your question with an example.