+92 332 4229 857 99ProjectIdeas@Gmail.com

LINQ Min() Method (Vb.net)



The following code shows you how to find a minimum value from array. We can do this through loop and going through every array index and compare it with all elements in array. But through LINQ Min() method we dont need do all this. See the code below.






Dim intArr As Integer() = {2, 1, 2, 3, 7, 5, 10, 9}

Dim query = intArr.Min()

Console.Write(query.ToString())

Output of the program is:

0 comments: