Share via


MaxValue Field

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

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

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

Syntax

'Declaration
Public Const MaxValue As Short
public const short MaxValue
public:
literal short MaxValue
static val mutable MaxValue: int16
public const var MaxValue : short

Remarks

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

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

.NET Framework Security

See Also

Reference

Int16 Structure

System Namespace