例 次の例では、 メソッドを使用して、 Max 2 つの変数のうち大きい方を返して表示する方法を示します。 // This example demonstrates Math.Max() using namespace System; int main() { String^ str = "{0}: The greater of {1,3} and {2,3} is {3}."; String^ nl = Environment::NewLine; Byte xByte1 = 1,xByte2 = 51; short xShort1 = -2,xShort2 = 52; int xInt1 = -3,xInt2 = 53; long xLong1 = -4,xLong2 = 54; float xSingle1 = 5.0f,xSingle2 = 55.0f; double xDouble