Click or drag to resize
UInt16 Structure
Represents a 16-bit unsigned integer.

Namespace: System
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
[SerializableAttribute]
public struct UInt16 : IComparable, IFormattable, 
	IConvertible, IComparable<ushort>, IEquatable<ushort>

The UInt16 type exposes the following members.

Methods
  NameDescription
Public methodCompareTo(Object)
Compares this instance to a specified object and returns an indication of their relative values.
Public methodCompareTo(UInt16)
Compares this instance to a specified 16-bit unsigned integer and returns an indication of their relative values.
Public methodEquals(Object)
Returns a value indicating whether this instance is equal to a specified object.
(Overrides ValueType.Equals(Object).)
Public methodEquals(UInt16)
Returns a value indicating whether this instance is equal to a specified UInt16 value.
Public methodGetHashCode
Returns the hash code for this instance.
(Overrides ValueType.GetHashCode().)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodToString()
Converts the numeric value of this instance to its equivalent string representation.
(Overrides ValueType.ToString().)
Public methodToString(IFormatProvider)
Converts the numeric value of this instance to its equivalent string representation using the specified culture-specific format information.
Public methodToString(String)
Converts the numeric value of this instance to its equivalent string representation using the specified format.
Public methodToString(String, IFormatProvider)
Converts the numeric value of this instance to its equivalent string representation using the specified format and culture-specific format information.
Public methodStatic memberTryParse(String, UInt16)
Tries to convert the string representation of a number to its 16-bit unsigned integer equivalent. A return value indicates whether the conversion succeeded or failed.
Public methodStatic memberTryParse(String, NumberStyles, IFormatProvider, UInt16)
Tries to convert the string representation of a number in a specified style and culture-specific format to its 16-bit unsigned integer equivalent. A return value indicates whether the conversion succeeded or failed.
Top
Fields
  NameDescription
Public fieldStatic memberMaxValue
Represents the largest possible value of UInt16. This field is constant.
Public fieldStatic memberMinValue
Represents the smallest possible value of UInt16. This field is constant.
Top
See Also