This documentation is archived and is not being maintained.
UInt16::MaxValue Field
Visual Studio 2010
Represents the largest possible value of UInt16. This field is constant.
Assembly: mscorlib (in mscorlib.dll)
The following example uses the UInt16::MaxValue and UInt16::MinValue properties to ensure that an Int32 value is in the range of the UInt16 type before converting it to a UInt16 value. This prevents the conversion operation from throwing an OverflowException if the integer value is not in the range of the UInt16 type.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: