9 [__DynamicallyInvokable]
14 internal const int True = 1;
16 internal const int False = 0;
18 internal const string TrueLiteral =
"True";
20 internal const string FalseLiteral =
"False";
23 [__DynamicallyInvokable]
27 [__DynamicallyInvokable]
32 [__DynamicallyInvokable]
44 [__DynamicallyInvokable]
71 [__DynamicallyInvokable]
72 public override bool Equals(
object obj)
78 return this == (bool)obj;
86 [__DynamicallyInvokable]
108 if (
this == (
bool)obj)
122 [__DynamicallyInvokable]
144 [__DynamicallyInvokable]
145 public static bool Parse(
string value)
164 [__DynamicallyInvokable]
165 public static bool TryParse(
string value, out
bool result)
182 value = TrimWhiteSpaceAndNull(value);
196 private static string TrimWhiteSpaceAndNull(
string value)
199 int num = value.Length - 1;
201 for (c =
'\0'; i < value.Length && (
char.IsWhiteSpace(value[i]) || value[i] == c); i++)
204 while (num >= i && (
char.IsWhiteSpace(value[num]) || value[num] == c))
208 return value.Substring(i, num - i + 1);
222 [__DynamicallyInvokable]
232 [__DynamicallyInvokable]
241 [__DynamicallyInvokable]
250 [__DynamicallyInvokable]
259 [__DynamicallyInvokable]
268 [__DynamicallyInvokable]
277 [__DynamicallyInvokable]
286 [__DynamicallyInvokable]
295 [__DynamicallyInvokable]
304 [__DynamicallyInvokable]
313 [__DynamicallyInvokable]
322 [__DynamicallyInvokable]
331 [__DynamicallyInvokable]
341 [__DynamicallyInvokable]
354 [__DynamicallyInvokable]
357 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.
The exception that is thrown when a null reference (Nothing in Visual Basic) is passed to a method th...
int CompareTo(bool value)
Compares this instance to a specified T:System.Boolean object and returns an integer that indicates t...
double ToDouble(IFormatProvider provider)
Converts the value of this instance to an equivalent double-precision floating-point number using the...
static readonly string FalseString
Represents the Boolean value false as a string. This field is read-only.
StringComparison
Specifies the culture, case, and sort rules to be used by certain overloads of the M:System....
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.
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 ....
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 ...
Provides information about, and means to manipulate, the current environment and platform....
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.
object ToType(Type conversionType, IFormatProvider provider)
Converts the value of this instance to an T:System.Object of the specified T:System....
static bool Parse(string value)
Converts the specified string representation of a logical value to its T:System.Boolean equivalent.
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...
override string ToString()
Converts the value of this instance to its equivalent string representation (either "True" or "False"...
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.
static bool TryParse(string value, out bool result)
Tries to convert the specified string representation of a logical value to its T:System....
int CompareTo(object obj)
Compares this instance to a specified object and returns an integer that indicates their relationship...
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...
TypeCode GetTypeCode()
Returns the type code for the T:System.Boolean value type.
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.
Represents a Boolean (true or false) value.
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.
bool Equals(bool obj)
Returns a value indicating whether this instance is equal to a specified T:System....
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 readonly string TrueString
Represents the Boolean value true as a string. This field is read-only.
override int GetHashCode()
Returns the hash code for this instance.
uint ToUInt32(IFormatProvider provider)
Converts the value of this instance to an equivalent 32-bit unsigned integer using the specified cult...
string ToString(IFormatProvider provider)
Converts the value of this instance to its equivalent string representation (either "True" or "False"...