12 [__DynamicallyInvokable]
15 private ushort m_value;
18 [__DynamicallyInvokable]
22 [__DynamicallyInvokable]
39 return this - (ushort)value;
47 [__DynamicallyInvokable]
57 [__DynamicallyInvokable]
58 public override bool Equals(
object obj)
64 return this == (ushort)obj;
72 [__DynamicallyInvokable]
80 [__DynamicallyInvokable]
88 [SecuritySafeCritical]
89 [__DynamicallyInvokable]
98 [SecuritySafeCritical]
99 [__DynamicallyInvokable]
109 [SecuritySafeCritical]
110 [__DynamicallyInvokable]
122 [SecuritySafeCritical]
123 [__DynamicallyInvokable]
138 [CLSCompliant(
false)]
139 [__DynamicallyInvokable]
140 public static ushort
Parse(
string s)
159 [CLSCompliant(
false)]
160 [__DynamicallyInvokable]
177 [CLSCompliant(
false)]
178 [__DynamicallyInvokable]
199 [CLSCompliant(
false)]
200 [__DynamicallyInvokable]
212 num = Number.ParseUInt32(s, style, info);
214 catch (OverflowException innerException)
216 throw new OverflowException(Environment.GetResourceString(
"Overflow_UInt16"), innerException);
220 throw new OverflowException(Environment.GetResourceString(
"Overflow_UInt16"));
230 [CLSCompliant(
false)]
231 [__DynamicallyInvokable]
232 public static bool TryParse(
string s, out ushort result)
247 [CLSCompliant(
false)]
248 [__DynamicallyInvokable]
258 if (!Number.TryParseUInt32(s, style, info, out uint result2))
266 result = (ushort)result2;
281 [__DynamicallyInvokable]
290 [__DynamicallyInvokable]
299 [__DynamicallyInvokable]
308 [__DynamicallyInvokable]
317 [__DynamicallyInvokable]
326 [__DynamicallyInvokable]
335 [__DynamicallyInvokable]
344 [__DynamicallyInvokable]
353 [__DynamicallyInvokable]
362 [__DynamicallyInvokable]
371 [__DynamicallyInvokable]
380 [__DynamicallyInvokable]
389 [__DynamicallyInvokable]
399 [__DynamicallyInvokable]
409 [__DynamicallyInvokable]
412 return Convert.DefaultToType(
this, type, provider);
float ToSingle(IFormatProvider provider)
Converts the value of this instance to an equivalent single-precision floating-point number using the...
Converts a base data type to another base data type.
static long ToInt64(object value)
Converts the value of the specified object to a 64-bit signed integer.
static double ToDouble(object value)
Converts the value of the specified object to a double-precision floating-point number.
double ToDouble(IFormatProvider provider)
Converts the value of this instance to an equivalent double-precision floating-point number using the...
static bool TryParse(string s, out ushort result)
Tries to convert the string representation of a number to its 16-bit unsigned integer equivalent....
bool ToBoolean(IFormatProvider provider)
Converts the value of this instance to an equivalent Boolean value using the specified culture-specif...
TypeCode
Specifies the type of an object.
static float ToSingle(object value)
Converts the value of the specified object to a single-precision floating-point number.
The exception that is thrown for invalid casting or explicit conversion.
override int GetHashCode()
Returns the hash code for this instance.
char ToChar(IFormatProvider provider)
Converts the value of this instance to an equivalent Unicode character using the specified culture-sp...
TypeCode GetTypeCode()
Returns the T:System.TypeCode for value type T:System.UInt16.
string ToString(IFormatProvider provider)
Converts the numeric value of this instance to its equivalent string representation using the specifi...
int CompareTo(ushort value)
Compares this instance to a specified 16-bit unsigned integer and returns an indication of their rela...
Represents an instant in time, typically expressed as a date and time of day. To browse the ....
static ushort Parse(string s, NumberStyles style, IFormatProvider provider)
Converts the string representation of a number in a specified style and culture-specific format to it...
Represents a 16-bit unsigned integer.
DateTime ToDateTime(IFormatProvider provider)
Converts the value of this instance to an equivalent T:System.DateTime using the specified culture-sp...
sbyte ToSByte(IFormatProvider provider)
Converts the value of this instance to an equivalent 8-bit signed integer using the specified culture...
Defines a generalized type-specific comparison method that a value type or class implements to order ...
override bool Equals(object obj)
Returns a value indicating whether this instance is equal to a specified object.
NumberStyles
Determines the styles permitted in numeric string arguments that are passed to the Parse and TryParse...
static char ToChar(object value)
Converts the value of the specified object to a Unicode character.
Provides information about, and means to manipulate, the current environment and platform....
static bool ToBoolean(object value)
Converts the value of a specified object to an equivalent Boolean value.
decimal ToDecimal(IFormatProvider provider)
Converts the value of this instance to an equivalent T:System.Decimal number using the specified cult...
static ushort Parse(string s, IFormatProvider provider)
Converts the string representation of a number in a specified culture-specific format to its 16-bit u...
int ToInt32(IFormatProvider provider)
Converts the value of this instance to an equivalent 32-bit signed integer using the specified cultur...
const ushort MinValue
Represents the smallest possible value of T:System.UInt16. This field is constant.
object ToType(Type conversionType, IFormatProvider provider)
Converts the value of this instance to an T:System.Object of the specified T:System....
static sbyte ToSByte(object value)
Converts the value of the specified object to an 8-bit signed integer.
Represents type declarations: class types, interface types, array types, value types,...
ushort ToUInt16(IFormatProvider provider)
Converts the value of this instance to an equivalent 16-bit unsigned integer using the specified cult...
static uint ToUInt32(object value)
Converts the value of the specified object to a 32-bit unsigned integer.
short ToInt16(IFormatProvider provider)
Converts the value of this instance to an equivalent 16-bit signed integer using the specified cultur...
static decimal ToDecimal(object value)
Converts the value of the specified object to an equivalent decimal number.
bool Equals(ushort obj)
Returns a value indicating whether this instance is equal to a specified T:System....
long ToInt64(IFormatProvider provider)
Converts the value of this instance to an equivalent 64-bit signed integer using the specified cultur...
The exception that is thrown when one of the arguments provided to a method is not valid.
const ushort MaxValue
Represents the largest possible value of T:System.UInt16. This field is constant.
static bool TryParse(string s, NumberStyles style, IFormatProvider provider, out ushort result)
Tries to convert the string representation of a number in a specified style and culture-specific form...
static byte ToByte(object value)
Converts the value of the specified object to an 8-bit unsigned integer.
Defines a generalized method that a value type or class implements to create a type-specific method f...
static ushort Parse(string s, NumberStyles style)
Converts the string representation of a number in a specified style to its 16-bit unsigned integer eq...
static short ToInt16(object value)
Converts the value of the specified object to a 16-bit signed integer.
Specifies that the class can be serialized.
override string ToString()
Converts the numeric value of this instance to its equivalent string representation.
ulong ToUInt64(IFormatProvider provider)
Converts the value of this instance to an equivalent 64-bit unsigned integer using the specified cult...
static ulong ToUInt64(object value)
Converts the value of the specified object to a 64-bit unsigned integer.
static int ToInt32(object value)
Converts the value of the specified object to a 32-bit signed integer.
byte ToByte(IFormatProvider provider)
Converts the value of this instance to an equivalent 8-bit unsigned integer using the specified cultu...
Defines methods that convert the value of the implementing reference or value type to a common langua...
string ToString(string format)
Converts the numeric value of this instance to its equivalent string representation using the specifi...
string ToString(string format, IFormatProvider provider)
Converts the numeric value of this instance to its equivalent string representation using the specifi...
uint ToUInt32(IFormatProvider provider)
Converts the value of this instance to an equivalent 32-bit unsigned integer using the specified cult...
static ushort Parse(string s)
Converts the string representation of a number to its 16-bit unsigned integer equivalent.
int CompareTo(object value)
Compares this instance to a specified object and returns an indication of their relative values.