12 [__DynamicallyInvokable]
15 private sbyte m_value;
18 [__DynamicallyInvokable]
22 [__DynamicallyInvokable]
41 return this - (sbyte)obj;
47 [__DynamicallyInvokable]
57 [__DynamicallyInvokable]
58 public override bool Equals(
object obj)
64 return this == (sbyte)obj;
72 [__DynamicallyInvokable]
80 [__DynamicallyInvokable]
83 return this ^ (
this << 8);
88 [SecuritySafeCritical]
89 [__DynamicallyInvokable]
98 [SecuritySafeCritical]
99 [__DynamicallyInvokable]
110 [__DynamicallyInvokable]
122 [__DynamicallyInvokable]
128 [SecuritySafeCritical]
131 if (this < 0 && format != null && format.Length > 0 && (format[0] ==
'X' || format[0] ==
'x'))
133 uint value = (uint)(
this & 0xFF);
134 return Number.FormatUInt32(value, format, info);
136 return Number.FormatInt32(
this, format, info);
148 [CLSCompliant(
false)]
149 [__DynamicallyInvokable]
169 [CLSCompliant(
false)]
170 [__DynamicallyInvokable]
187 [CLSCompliant(
false)]
188 [__DynamicallyInvokable]
209 [CLSCompliant(
false)]
210 [__DynamicallyInvokable]
222 num = Number.ParseInt32(s, style, info);
224 catch (OverflowException innerException)
226 throw new OverflowException(Environment.GetResourceString(
"Overflow_SByte"), innerException);
230 if (num < 0 || num > 255)
232 throw new OverflowException(Environment.GetResourceString(
"Overflow_SByte"));
236 if (num < -128 || num > 127)
238 throw new OverflowException(Environment.GetResourceString(
"Overflow_SByte"));
248 [CLSCompliant(
false)]
249 [__DynamicallyInvokable]
250 public static bool TryParse(
string s, out sbyte result)
265 [CLSCompliant(
false)]
266 [__DynamicallyInvokable]
276 if (!Number.TryParseInt32(s, style, info, out
int result2))
282 if (result2 < 0 || result2 > 255)
286 result = (sbyte)result2;
289 if (result2 < -128 || result2 > 127)
293 result = (sbyte)result2;
308 [__DynamicallyInvokable]
317 [__DynamicallyInvokable]
326 [__DynamicallyInvokable]
335 [__DynamicallyInvokable]
344 [__DynamicallyInvokable]
353 [__DynamicallyInvokable]
362 [__DynamicallyInvokable]
371 [__DynamicallyInvokable]
380 [__DynamicallyInvokable]
389 [__DynamicallyInvokable]
398 [__DynamicallyInvokable]
407 [__DynamicallyInvokable]
416 [__DynamicallyInvokable]
426 [__DynamicallyInvokable]
436 [__DynamicallyInvokable]
439 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...
string ToString(string format, IFormatProvider provider)
Converts the numeric value of this instance to its equivalent string representation using the specifi...
static sbyte Parse(string s, IFormatProvider provider)
Converts the string representation of a number in a specified culture-specific format to its 8-bit si...
string ToString(IFormatProvider provider)
Converts the numeric value of this instance to its equivalent string representation using the specifi...
const sbyte MinValue
Represents the smallest possible value of T:System.SByte. This field is constant.
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.
TypeCode GetTypeCode()
Returns the T:System.TypeCode for value type T:System.SByte.
The exception that is thrown for invalid casting or explicit conversion.
static sbyte Parse(string s)
Converts the string representation of a number to its 8-bit signed integer equivalent.
char ToChar(IFormatProvider provider)
Converts the value of this instance to an equivalent Unicode character using the specified culture-sp...
bool Equals(sbyte obj)
Returns a value indicating whether this instance is equal to a specified T:System....
Represents an instant in time, typically expressed as a date and time of day. To browse the ....
DateTime ToDateTime(IFormatProvider provider)
Converts the value of this instance to an equivalent T:System.DateTime using the specified culture-sp...
const sbyte MaxValue
Represents the largest possible value of T:System.SByte. 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.
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...
int ToInt32(IFormatProvider provider)
Converts the value of this instance to an equivalent 32-bit signed integer using the specified cultur...
override bool Equals(object obj)
Returns a value indicating whether this instance is equal to a specified object.
static ushort ToUInt16(object value)
Converts the value of the specified object to a 16-bit unsigned integer.
string ToString(string format)
Converts the numeric value of this instance to its equivalent string representation,...
object ToType(Type conversionType, IFormatProvider provider)
Converts the value of this instance to an T:System.Object of the specified T:System....
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.
Represents an 8-bit signed integer.
static sbyte Parse(string s, NumberStyles style, IFormatProvider provider)
Converts the string representation of a number that is in a specified style and culture-specific form...
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.
static bool TryParse(string s, NumberStyles style, IFormatProvider provider, out sbyte result)
Tries to convert the string representation of a number in a specified style and culture-specific form...
override string ToString()
Converts the numeric value of this instance to its equivalent string representation.
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 short ToInt16(object value)
Converts the value of the specified object to a 16-bit signed integer.
static bool TryParse(string s, out sbyte result)
Tries to convert the string representation of a number to its T:System.SByte equivalent,...
Specifies that the class can be serialized.
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.
int CompareTo(object obj)
Compares this instance to a specified object and returns an indication of their relative values.
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 sbyte Parse(string s, NumberStyles style)
Converts the string representation of a number in a specified style to its 8-bit signed integer equiv...
uint ToUInt32(IFormatProvider provider)
Converts the value of this instance to an equivalent 32-bit unsigned integer using the specified cult...
int CompareTo(sbyte value)
Compares this instance to a specified 8-bit signed integer and returns an indication of their relativ...