开发者

How to take max value from the integer [closed]

开发者 https://www.devze.com 2023-04-12 03:28 出处:网络
开发者_如何学Go It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form.
开发者_如何学Go It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

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();
0

精彩评论

暂无评论...
验证码 换一张
取 消