Min - Projection

Query
public void Linq82()
{
string[] words = { "cherry", "apple", "blueberry" };

int shortestWord = words.Min(w => w.Length);

Console.WriteLine("The shortest word is {0} characters long.", shortestWord);
}
Lambda Expression
public void Linq82()
{
string[] words = { "cherry", "apple", "blueberry" };

int shortestWord = words.Min(w => w.Length);

Console.WriteLine("The shortest word is {0} characters long.", shortestWord);
}
Output
The shortest word is 5 characters long.
Related Tutorial
Follow Us
https://www.facebook.com/Rookie-Nerd-638990322793530 https://twitter.com/RookieNerdTutor https://plus.google.com/b/117136517396468545840 #
Contents +