How to take max value from the integer [closed]
Using VB.Net
Dim a, b, c, d as int32
a = 20
b = 30
c = 15
d = 25
From the above 4 value, i need to take max value.
so the max value is b = 30
How to get max value.
You can use Linq extension methods (System.Linq namespace) if you add these values to some collection:
Dim numbers As New List(Of Integer) { 20, 30, 15, 25 };
Dim maxNumber As Integer = numbers.Max();
精彩评论