Is there a method to find the max of 3 numbers in C#? Ask Question

Is there a method to find the max of 3 numbers in C#? Ask Question

The method should work like Math.Max(), but take 3 or more int parameters.

ベストアンサー1

You could use Enumerable.Max:

new [] { 1, 2, 3 }.Max();

おすすめ記事