18 implementations of ToBoolean
Microsoft.Gen.Logging.Generated.Tests (1)
parent\TestClasses\FormattableTestExtensions.cs (1)
31
public readonly bool
ToBoolean
(IFormatProvider? provider) => throw new NotSupportedException();
System.Private.CoreLib (17)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Boolean.cs (1)
326
bool IConvertible.
ToBoolean
(IFormatProvider? provider)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Byte.cs (1)
176
bool IConvertible.
ToBoolean
(IFormatProvider? provider)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Char.cs (1)
584
bool IConvertible.
ToBoolean
(IFormatProvider? provider)
src\runtime\src\libraries\System.Private.CoreLib\src\System\DateTime.cs (1)
1950
bool IConvertible.
ToBoolean
(IFormatProvider? provider) => throw InvalidCast(nameof(Boolean));
src\runtime\src\libraries\System.Private.CoreLib\src\System\DBNull.cs (1)
42
bool IConvertible.
ToBoolean
(IFormatProvider? provider)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Decimal.cs (1)
1029
bool IConvertible.
ToBoolean
(IFormatProvider? provider)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Double.cs (1)
450
bool IConvertible.
ToBoolean
(IFormatProvider? provider)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Enum.cs (1)
2178
bool IConvertible.
ToBoolean
(IFormatProvider? provider) => Convert.ToBoolean(GetValue());
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int16.cs (1)
179
bool IConvertible.
ToBoolean
(IFormatProvider? provider)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int32.cs (1)
194
bool IConvertible.
ToBoolean
(IFormatProvider? provider)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int64.cs (1)
191
bool IConvertible.
ToBoolean
(IFormatProvider? provider)
src\runtime\src\libraries\System.Private.CoreLib\src\System\SByte.cs (1)
182
bool IConvertible.
ToBoolean
(IFormatProvider? provider)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Single.cs (1)
443
bool IConvertible.
ToBoolean
(IFormatProvider? provider)
src\runtime\src\libraries\System.Private.CoreLib\src\System\String.cs (1)
632
bool IConvertible.
ToBoolean
(IFormatProvider? provider)
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt16.cs (1)
173
bool IConvertible.
ToBoolean
(IFormatProvider? provider)
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt32.cs (1)
189
bool IConvertible.
ToBoolean
(IFormatProvider? provider)
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt64.cs (1)
188
bool IConvertible.
ToBoolean
(IFormatProvider? provider)
53 references to ToBoolean
Microsoft.CSharp (1)
Microsoft\CSharp\RuntimeBinder\ComInterop\DynamicVariantExtensions.cs (1)
60
case TypeCode.Boolean: variant = ComVariant.Create<bool>(value.
ToBoolean
(ci)); break;
Microsoft.VisualBasic.Core (36)
Microsoft\VisualBasic\CompilerServices\BooleanType.vb (1)
68
Return CBool(ValueInterface.
ToBoolean
(Nothing))
Microsoft\VisualBasic\CompilerServices\ByteType.vb (1)
57
Return CByte(ValueInterface.
ToBoolean
(Nothing))
Microsoft\VisualBasic\CompilerServices\Conversions.vb (15)
75
Return CBool(ValueInterface.
ToBoolean
(Nothing))
137
Return ValueInterface.
ToBoolean
(Nothing)
219
Return CByte(ValueInterface.
ToBoolean
(Nothing))
366
Return CSByte(ValueInterface.
ToBoolean
(Nothing))
509
Return CShort(ValueInterface.
ToBoolean
(Nothing))
655
Return CUShort(ValueInterface.
ToBoolean
(Nothing))
798
Return CInt(ValueInterface.
ToBoolean
(Nothing))
943
Return CUInt(ValueInterface.
ToBoolean
(Nothing))
1089
Return CLng(ValueInterface.
ToBoolean
(Nothing))
1236
Return CULng(ValueInterface.
ToBoolean
(Nothing))
1395
Return CDec(ValueInterface.
ToBoolean
(Nothing))
1635
Return CSng(ValueInterface.
ToBoolean
(Nothing))
1780
Return CDbl(ValueInterface.
ToBoolean
(Nothing))
2262
Return CStr(ValueInterface.
ToBoolean
(Nothing))
2423
Case TypeCode.Boolean : Return iconv.
ToBoolean
(Nothing)
Microsoft\VisualBasic\CompilerServices\DecimalType.vb (1)
72
Return DecimalType.FromBoolean(valueInterface.
ToBoolean
(Nothing))
Microsoft\VisualBasic\CompilerServices\DoubleType.vb (1)
65
Return CDbl(valueInterface.
ToBoolean
(Nothing))
Microsoft\VisualBasic\CompilerServices\IntegerType.vb (1)
57
Return CInt(ValueInterface.
ToBoolean
(Nothing))
Microsoft\VisualBasic\CompilerServices\LongType.vb (1)
60
Return CLng(ValueInterface.
ToBoolean
(Nothing))
Microsoft\VisualBasic\CompilerServices\ObjectType.vb (10)
617
Return ObjTstBoolean(conv1.
ToBoolean
(Nothing), BooleanType.FromString(conv2.ToString(Nothing)))
620
Return ObjTstBoolean(BooleanType.FromString(conv1.ToString(Nothing)), conv2.
ToBoolean
(Nothing))
899
Return CShort(conv.
ToBoolean
(Nothing))
969
Int16Result = -CShort(conv.
ToBoolean
(Nothing))
1142
Return Not iconv.
ToBoolean
(Nothing)
1810
If conv.
ToBoolean
(Nothing) Then
1818
If conv.
ToBoolean
(Nothing) Then
3360
Return CShort(conv1.
ToBoolean
(Nothing)) << amount
3397
Return CShort(conv1.
ToBoolean
(Nothing)) >> amount
3644
Return iconv.
ToBoolean
(Nothing)
Microsoft\VisualBasic\CompilerServices\ShortType.vb (1)
57
Return CShort(ValueInterface.
ToBoolean
(Nothing))
Microsoft\VisualBasic\CompilerServices\SingleType.vb (1)
71
Return CSng(ValueInterface.
ToBoolean
(Nothing))
Microsoft\VisualBasic\CompilerServices\StringType.vb (1)
115
Return FromBoolean(ValueInterface.
ToBoolean
(Nothing))
Microsoft\VisualBasic\Conversion.vb (1)
496
If ValueInterface.
ToBoolean
(Nothing) Then
Microsoft\VisualBasic\Strings.vb (1)
1282
Return System.String.Format(cp, Style, CStr(ConvertibleExpression.
ToBoolean
(Nothing)))
System.Data.Common (2)
System\Data\Common\BooleanStorage.cs (2)
121
value = ((IConvertible)value).
ToBoolean
(FormatProvider);
157
_values[record] = ((IConvertible)value).
ToBoolean
(FormatProvider);
System.Data.Odbc (2)
Common\System\Data\Common\DbConnectionStringCommon.cs (2)
186
return ((IConvertible)value).
ToBoolean
(CultureInfo.InvariantCulture);
225
return ((IConvertible)value).
ToBoolean
(CultureInfo.InvariantCulture);
System.Data.OleDb (1)
DbConnectionStringCommon.cs (1)
154
return ((IConvertible)value).
ToBoolean
(CultureInfo.InvariantCulture);
System.Private.CoreLib (7)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Convert.cs (7)
145
TypeCode.Boolean => v.
ToBoolean
(provider),
179
return value.
ToBoolean
(provider);
251
return ic.
ToBoolean
(provider);
316
return value != null && ((IConvertible)value).
ToBoolean
(null);
321
return value != null && ((IConvertible)value).
ToBoolean
(provider);
339
return ((IConvertible)value).
ToBoolean
(null);
411
return ((IConvertible)value).
ToBoolean
(null);
System.Windows.Forms.Design (4)
System\ComponentModel\Design\Serialization\CodeDomSerializerBase.cs (4)
1442
result = (left.
ToBoolean
(null) || right.
ToBoolean
(null));
1445
result = (left.
ToBoolean
(null) && right.
ToBoolean
(null));