11 [__DynamicallyInvokable]
17 [__DynamicallyInvokable]
21 [__DynamicallyInvokable]
40 return this - (byte)value;
46 [__DynamicallyInvokable]
56 [__DynamicallyInvokable]
57 public override bool Equals(
object obj)
63 return this == (byte)obj;
71 [__DynamicallyInvokable]
79 [__DynamicallyInvokable]
94 [__DynamicallyInvokable]
95 public static byte Parse(
string s)
114 [__DynamicallyInvokable]
131 [__DynamicallyInvokable]
152 [__DynamicallyInvokable]
164 num = Number.ParseInt32(s, style, info);
166 catch (OverflowException innerException)
168 throw new OverflowException(Environment.GetResourceString(
"Overflow_Byte"), innerException);
170 if (num < 0 || num > 255)
172 throw new OverflowException(Environment.GetResourceString(
"Overflow_Byte"));
182 [__DynamicallyInvokable]
183 public static bool TryParse(
string s, out
byte result)
198 [__DynamicallyInvokable]
208 if (!Number.TryParseInt32(s, style, info, out
int result2))
212 if (result2 < 0 || result2 > 255)
216 result = (byte)result2;
222 [SecuritySafeCritical]
223 [__DynamicallyInvokable]
234 [SecuritySafeCritical]
235 [__DynamicallyInvokable]
244 [SecuritySafeCritical]
245 [__DynamicallyInvokable]
257 [SecuritySafeCritical]
258 [__DynamicallyInvokable]
275 [__DynamicallyInvokable]
284 [__DynamicallyInvokable]
293 [__DynamicallyInvokable]
302 [__DynamicallyInvokable]
311 [__DynamicallyInvokable]
320 [__DynamicallyInvokable]
329 [__DynamicallyInvokable]
338 [__DynamicallyInvokable]
347 [__DynamicallyInvokable]
356 [__DynamicallyInvokable]
365 [__DynamicallyInvokable]
374 [__DynamicallyInvokable]
383 [__DynamicallyInvokable]
393 [__DynamicallyInvokable]
406 [__DynamicallyInvokable]
409 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.
override string ToString()
Converts the value of the current T:System.Byte object to its equivalent string representation.
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.
string ToString(IFormatProvider provider)
Converts the numeric value of the current T:System.Byte object to its equivalent string representatio...
static byte Parse(string s)
Converts the string representation of a number to its T:System.Byte equivalent.
override bool Equals(object obj)
Returns a value indicating whether this instance is equal to a specified object.
double ToDouble(IFormatProvider provider)
Converts the value of this instance to an equivalent double-precision floating-point number using the...
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.
int CompareTo(object value)
Compares this instance to a specified object and returns an indication of their relative values.
The exception that is thrown for invalid casting or explicit conversion.
char ToChar(IFormatProvider provider)
Converts the value of this instance to an equivalent Unicode character using the specified culture-sp...
Represents an instant in time, typically expressed as a date and time of day. To browse the ....
static byte Parse(string s, NumberStyles style, IFormatProvider provider)
Converts the string representation of a number in a specified style and culture-specific format to it...
DateTime ToDateTime(IFormatProvider provider)
Converts the value of this instance to an equivalent T:System.DateTime using the specified culture-sp...
const byte MinValue
Represents the smallest possible value of a T:System.Byte. This field is constant.
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 ...
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.
string ToString(string format, IFormatProvider provider)
Converts the value of the current T:System.Byte object to its equivalent string representation using ...
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...
TypeCode GetTypeCode()
Returns the T:System.TypeCode for value type T:System.Byte.
int ToInt32(IFormatProvider provider)
Converts the value of this instance to an equivalent 32-bit signed integer using the specified cultur...
const byte MaxValue
Represents the largest possible value of a T:System.Byte. This field is constant.
static ushort ToUInt16(object value)
Converts the value of the specified object to a 16-bit unsigned integer.
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,...
int CompareTo(byte value)
Compares this instance to a specified 8-bit unsigned integer and returns an indication of their relat...
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.
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.
override int GetHashCode()
Returns the hash code for this instance.
Defines a generalized method that a value type or class implements to create a type-specific method f...
static short ToInt16(object value)
Converts the value of the specified object to a 16-bit signed integer.
static bool TryParse(string s, NumberStyles style, IFormatProvider provider, out byte result)
Converts the string representation of a number in a specified style and culture-specific format to it...
Specifies that the class can be serialized.
static bool TryParse(string s, out byte result)
Tries to convert the string representation of a number to its T:System.Byte equivalent,...
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...
static byte Parse(string s, NumberStyles style)
Converts the string representation of a number in a specified style to its T:System....
string ToString(string format)
Converts the value of the current T:System.Byte object to its equivalent string representation using ...
Represents an 8-bit unsigned integer.
bool Equals(byte obj)
Returns a value indicating whether this instance and a specified T:System.Byte object represent the s...
static byte Parse(string s, IFormatProvider provider)
Converts the string representation of a number in a specified culture-specific format to its T:System...
uint ToUInt32(IFormatProvider provider)
Converts the value of this instance to an equivalent 32-bit unsigned integer using the specified cult...