mscorlib(4.0.0.0) API with additions
|
Represents a Boolean (true
or false
) value.
More...
Public Member Functions | |
override int | GetHashCode () |
Returns the hash code for this instance. More... | |
override string | ToString () |
Converts the value of this instance to its equivalent string representation (either "True" or "False"). More... | |
string | ToString (IFormatProvider provider) |
Converts the value of this instance to its equivalent string representation (either "True" or "False"). More... | |
override bool | Equals (object obj) |
Returns a value indicating whether this instance is equal to a specified object. More... | |
bool | Equals (bool obj) |
Returns a value indicating whether this instance is equal to a specified T:System.Boolean object. More... | |
int | CompareTo (object obj) |
Compares this instance to a specified object and returns an integer that indicates their relationship to one another. More... | |
int | CompareTo (bool value) |
Compares this instance to a specified T:System.Boolean object and returns an integer that indicates their relationship to one another. More... | |
TypeCode | GetTypeCode () |
Returns the type code for the T:System.Boolean value type. More... | |
bool IConvertible. | ToBoolean (IFormatProvider provider) |
For a description of this member, see M:System.IConvertible.ToBoolean(System.IFormatProvider). More... | |
char IConvertible. | ToChar (IFormatProvider provider) |
This conversion is not supported. Attempting to use this method throws an T:System.InvalidCastException. More... | |
sbyte IConvertible. | ToSByte (IFormatProvider provider) |
For a description of this member, see M:System.IConvertible.ToSByte(System.IFormatProvider). More... | |
byte IConvertible. | ToByte (IFormatProvider provider) |
For a description of this member, see M:System.IConvertible.ToByte(System.IFormatProvider). More... | |
short IConvertible. | ToInt16 (IFormatProvider provider) |
For a description of this member, see M:System.IConvertible.ToInt16(System.IFormatProvider). More... | |
ushort IConvertible. | ToUInt16 (IFormatProvider provider) |
For a description of this member, see M:System.IConvertible.ToUInt16(System.IFormatProvider). More... | |
int IConvertible. | ToInt32 (IFormatProvider provider) |
For a description of this member, see M:System.IConvertible.ToInt32(System.IFormatProvider). More... | |
uint IConvertible. | ToUInt32 (IFormatProvider provider) |
For a description of this member, see M:System.IConvertible.ToUInt32(System.IFormatProvider). More... | |
long IConvertible. | ToInt64 (IFormatProvider provider) |
For a description of this member, see M:System.IConvertible.ToInt64(System.IFormatProvider). More... | |
ulong IConvertible. | ToUInt64 (IFormatProvider provider) |
For a description of this member, see M:System.IConvertible.ToUInt64(System.IFormatProvider). More... | |
float IConvertible. | ToSingle (IFormatProvider provider) |
For a description of this member, see M:System.IConvertible.ToSingle(System.IFormatProvider).. More... | |
double IConvertible. | ToDouble (IFormatProvider provider) |
For a description of this member, see M:System.IConvertible.ToDouble(System.IFormatProvider).. More... | |
decimal IConvertible. | ToDecimal (IFormatProvider provider) |
For a description of this member, see M:System.IConvertible.ToDecimal(System.IFormatProvider).. More... | |
DateTime IConvertible. | ToDateTime (IFormatProvider provider) |
This conversion is not supported. Attempting to use this method throws an T:System.InvalidCastException. More... | |
object IConvertible. | ToType (Type type, IFormatProvider provider) |
For a description of this member, see M:System.IConvertible.ToType(System.Type,System.IFormatProvider). More... | |
![]() | |
bool | Equals (T other) |
Indicates whether the current object is equal to another object of the same type. More... | |
Static Public Member Functions | |
static bool | Parse (string value) |
Converts the specified string representation of a logical value to its T:System.Boolean equivalent. More... | |
static bool | TryParse (string value, out bool result) |
Tries to convert the specified string representation of a logical value to its T:System.Boolean equivalent. A return value indicates whether the conversion succeeded or failed. More... | |
Public Attributes | |
internal const int | True = 1 |
internal const int | False = 0 |
internal const string | TrueLiteral = "True" |
internal const string | FalseLiteral = "False" |
Static Public Attributes | |
static readonly string | TrueString = "True" |
Represents the Boolean value true as a string. This field is read-only. More... | |
static readonly string | FalseString = "False" |
Represents the Boolean value false as a string. This field is read-only. More... | |
Represents a Boolean (true
or false
) value.
Definition at line 10 of file Boolean.cs.
int System.Boolean.CompareTo | ( | object | obj | ) |
Compares this instance to a specified object and returns an integer that indicates their relationship to one another.
obj | An object to compare to this instance, or null . |
false
and obj is true
. Zero This instance and obj are equal (either both are true
or both are false
). Greater than zero This instance is true
and obj is false
.-or- obj is null
. T:System.ArgumentException | obj is not a T:System.Boolean. |
Definition at line 98 of file Boolean.cs.
int System.Boolean.CompareTo | ( | bool | value | ) |
Compares this instance to a specified T:System.Boolean object and returns an integer that indicates their relationship to one another.
value | A T:System.Boolean object to compare to this instance. |
false
and value is true
. Zero This instance and value are equal (either both are true
or both are false
). Greater than zero This instance is true
and value is false
. Definition at line 123 of file Boolean.cs.
override bool System.Boolean.Equals | ( | object | obj | ) |
Returns a value indicating whether this instance is equal to a specified object.
obj | An object to compare to this instance. |
true
if obj is a T:System.Boolean and has the same value as this instance; otherwise, false
.Definition at line 72 of file Boolean.cs.
bool System.Boolean.Equals | ( | bool | obj | ) |
Returns a value indicating whether this instance is equal to a specified T:System.Boolean object.
obj | A T:System.Boolean value to compare to this instance. |
true
if obj has the same value as this instance; otherwise, false
.Definition at line 87 of file Boolean.cs.
override int System.Boolean.GetHashCode | ( | ) |
Returns the hash code for this instance.
Definition at line 33 of file Boolean.cs.
TypeCode System.Boolean.GetTypeCode | ( | ) |
Returns the type code for the T:System.Boolean value type.
Implements System.IConvertible.
Definition at line 213 of file Boolean.cs.
|
static |
Converts the specified string representation of a logical value to its T:System.Boolean equivalent.
value | A string containing the value to convert. |
true
if value is equivalent to F:System.Boolean.TrueString; false
if value is equivalent to F:System.Boolean.FalseString.T:System.ArgumentNullException | value is null . |
T:System.FormatException | value is not equivalent to F:System.Boolean.TrueString or F:System.Boolean.FalseString. |
Definition at line 145 of file Boolean.cs.
bool IConvertible. System.Boolean.ToBoolean | ( | IFormatProvider | provider | ) |
For a description of this member, see M:System.IConvertible.ToBoolean(System.IFormatProvider).
provider | This parameter is ignored. |
true
or false
.Implements System.IConvertible.
Definition at line 223 of file Boolean.cs.
byte IConvertible. System.Boolean.ToByte | ( | IFormatProvider | provider | ) |
For a description of this member, see M:System.IConvertible.ToByte(System.IFormatProvider).
provider | This parameter is ignored. |
true
; otherwise, 0. Implements System.IConvertible.
Definition at line 251 of file Boolean.cs.
char IConvertible. System.Boolean.ToChar | ( | IFormatProvider | provider | ) |
This conversion is not supported. Attempting to use this method throws an T:System.InvalidCastException.
provider | This parameter is ignored. |
T:System.InvalidCastException | You attempt to convert a T:System.Boolean value to a T:System.Char value. This conversion is not supported. |
Implements System.IConvertible.
Definition at line 233 of file Boolean.cs.
DateTime IConvertible. System.Boolean.ToDateTime | ( | IFormatProvider | provider | ) |
This conversion is not supported. Attempting to use this method throws an T:System.InvalidCastException.
provider | This parameter is ignored. |
T:System.InvalidCastException | You attempt to convert a T:System.Boolean value to a T:System.DateTime value. This conversion is not supported. |
Implements System.IConvertible.
Definition at line 342 of file Boolean.cs.
decimal IConvertible. System.Boolean.ToDecimal | ( | IFormatProvider | provider | ) |
For a description of this member, see M:System.IConvertible.ToDecimal(System.IFormatProvider)..
provider | This parameter is ignored. |
true
; otherwise, 0.Implements System.IConvertible.
Definition at line 332 of file Boolean.cs.
double IConvertible. System.Boolean.ToDouble | ( | IFormatProvider | provider | ) |
For a description of this member, see M:System.IConvertible.ToDouble(System.IFormatProvider)..
provider | This parameter is ignored. |
true
; otherwise, 0.Implements System.IConvertible.
Definition at line 323 of file Boolean.cs.
short IConvertible. System.Boolean.ToInt16 | ( | IFormatProvider | provider | ) |
For a description of this member, see M:System.IConvertible.ToInt16(System.IFormatProvider).
provider | This parameter is ignored. |
true
; otherwise, 0.Implements System.IConvertible.
Definition at line 260 of file Boolean.cs.
int IConvertible. System.Boolean.ToInt32 | ( | IFormatProvider | provider | ) |
For a description of this member, see M:System.IConvertible.ToInt32(System.IFormatProvider).
provider | This parameter is ignored. |
true
; otherwise, 0.Implements System.IConvertible.
Definition at line 278 of file Boolean.cs.
long IConvertible. System.Boolean.ToInt64 | ( | IFormatProvider | provider | ) |
For a description of this member, see M:System.IConvertible.ToInt64(System.IFormatProvider).
provider | This parameter is ignored. |
true
; otherwise, 0.Implements System.IConvertible.
Definition at line 296 of file Boolean.cs.
sbyte IConvertible. System.Boolean.ToSByte | ( | IFormatProvider | provider | ) |
For a description of this member, see M:System.IConvertible.ToSByte(System.IFormatProvider).
provider | This parameter is ignored. |
true
; otherwise, 0.Implements System.IConvertible.
Definition at line 242 of file Boolean.cs.
float IConvertible. System.Boolean.ToSingle | ( | IFormatProvider | provider | ) |
For a description of this member, see M:System.IConvertible.ToSingle(System.IFormatProvider)..
provider | This parameter is ignored. |
true
; otherwise, 0.Implements System.IConvertible.
Definition at line 314 of file Boolean.cs.
override string System.Boolean.ToString | ( | ) |
Converts the value of this instance to its equivalent string representation (either "True" or "False").
true
, or "False" (the value of the F:System.Boolean.FalseString property) if the value of this instance is false
.Definition at line 45 of file Boolean.cs.
string System.Boolean.ToString | ( | IFormatProvider | provider | ) |
Converts the value of this instance to its equivalent string representation (either "True" or "False").
provider | (Reserved) An T:System.IFormatProvider object. |
true
, or F:System.Boolean.FalseString if the value of this instance is false
.Implements System.IConvertible.
Definition at line 58 of file Boolean.cs.
object IConvertible. System.Boolean.ToType | ( | Type | type, |
IFormatProvider | provider | ||
) |
For a description of this member, see M:System.IConvertible.ToType(System.Type,System.IFormatProvider).
type | The desired type. |
provider | An T:System.IFormatProvider implementation that supplies culture-specific information about the format of the returned value. |
Boolean
object.T:System.ArgumentNullException | type is null . |
T:System.InvalidCastException | The requested type conversion is not supported. |
Implements System.IConvertible.
Definition at line 355 of file Boolean.cs.
ushort IConvertible. System.Boolean.ToUInt16 | ( | IFormatProvider | provider | ) |
For a description of this member, see M:System.IConvertible.ToUInt16(System.IFormatProvider).
provider | This parameter is ignored. |
true
; otherwise, 0.Implements System.IConvertible.
Definition at line 269 of file Boolean.cs.
uint IConvertible. System.Boolean.ToUInt32 | ( | IFormatProvider | provider | ) |
For a description of this member, see M:System.IConvertible.ToUInt32(System.IFormatProvider).
provider | This parameter is ignored. |
true
; otherwise, 0.Implements System.IConvertible.
Definition at line 287 of file Boolean.cs.
ulong IConvertible. System.Boolean.ToUInt64 | ( | IFormatProvider | provider | ) |
For a description of this member, see M:System.IConvertible.ToUInt64(System.IFormatProvider).
provider | This parameter is ignored. |
true
; otherwise, 0.Implements System.IConvertible.
Definition at line 305 of file Boolean.cs.
|
static |
Tries to convert the specified string representation of a logical value to its T:System.Boolean equivalent. A return value indicates whether the conversion succeeded or failed.
value | A string containing the value to convert. |
result | When this method returns, if the conversion succeeded, contains true if value is equal to F:System.Boolean.TrueString or false if value is equal to F:System.Boolean.FalseString. If the conversion failed, contains false . The conversion fails if value is null or is not equal to the value of either the F:System.Boolean.TrueString or F:System.Boolean.FalseString field. |
true
if value was converted successfully; otherwise, false
.Definition at line 165 of file Boolean.cs.
|
static |
Represents the Boolean value false
as a string. This field is read-only.
Definition at line 28 of file Boolean.cs.
|
static |
Represents the Boolean value true
as a string. This field is read-only.
Definition at line 24 of file Boolean.cs.