| ConvertToUInt16 Method (Object) | 
Converts the value of the specified object to a 16-bit unsigned integer.
 
Namespace: SystemAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
 Syntax
Syntaxpublic static ushort ToUInt16(
	Object value
)
Parameters
- value
- Type: SystemObject
 An object that implements the IConvertible interface, or null.
Return Value
Type: 
UInt16A 16-bit unsigned integer that is equivalent to 
value, or zero if 
value is null.
 Exceptions
Exceptions| Exception | Condition | 
|---|
| FormatException | value is not in an appropriate format. | 
| InvalidCastException | value does not implement the  IConvertible interface. -or-The conversion is not supported. | 
| OverflowException | value represents a number that is less than MinValue or greater than MaxValue. | 
 See Also
See Also