System.Int16.MaxValue Field

Represents the largest possible value of an short. This field is constant.

Value: 32767

Syntax

public const short MaxValue

Remarks

The value of this constant is 32767; that is, hexadecimal 0x7FFF.

The short.MaxValue property is typically used to prevent an OverflowException when converting from a numeric type with a greater upper range (such as a ushort or a int) to an short. The example illustrates this usage.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0