19 implementations of ToBoolean
Microsoft.AspNetCore.Mvc.TagHelpers.Test (1)
LinkTagHelperTest.cs (1)
1227
public bool
ToBoolean
(IFormatProvider provider)
Microsoft.Build.Engine.UnitTests (1)
BackEnd\TaskBuilderTestTask.cs (1)
43
public bool
ToBoolean
(IFormatProvider provider) => Value.ToBoolean(provider);
Microsoft.Gen.Logging.Generated.Tests (1)
test\Generators\Microsoft.Gen.Logging\TestClasses\FormattableTestExtensions.cs (1)
31
public readonly bool
ToBoolean
(IFormatProvider? provider) => throw new NotSupportedException();
System.Private.CoreLib (16)
src\libraries\System.Private.CoreLib\src\System\Boolean.cs (1)
326
bool IConvertible.
ToBoolean
(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\Byte.cs (1)
182
bool IConvertible.
ToBoolean
(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\Char.cs (1)
517
bool IConvertible.
ToBoolean
(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\DateTime.cs (1)
1976
bool IConvertible.
ToBoolean
(IFormatProvider? provider) => throw InvalidCast(nameof(Boolean));
src\libraries\System.Private.CoreLib\src\System\DBNull.cs (1)
42
bool IConvertible.
ToBoolean
(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\Decimal.cs (1)
1034
bool IConvertible.
ToBoolean
(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\Double.cs (1)
452
bool IConvertible.
ToBoolean
(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\Enum.cs (1)
2177
bool IConvertible.
ToBoolean
(IFormatProvider? provider) => Convert.ToBoolean(GetValue());
src\libraries\System.Private.CoreLib\src\System\Int16.cs (1)
185
bool IConvertible.
ToBoolean
(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\Int32.cs (1)
200
bool IConvertible.
ToBoolean
(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\Int64.cs (1)
197
bool IConvertible.
ToBoolean
(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\SByte.cs (1)
188
bool IConvertible.
ToBoolean
(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\Single.cs (1)
447
bool IConvertible.
ToBoolean
(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\UInt16.cs (1)
179
bool IConvertible.
ToBoolean
(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\UInt32.cs (1)
195
bool IConvertible.
ToBoolean
(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\UInt64.cs (1)
194
bool IConvertible.
ToBoolean
(IFormatProvider? provider)
52 references to ToBoolean
Microsoft.Build.Engine.UnitTests (1)
BackEnd\TaskBuilderTestTask.cs (1)
43
public bool ToBoolean(IFormatProvider provider) => Value.
ToBoolean
(provider);
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.Private.CoreLib (7)
src\libraries\System.Private.CoreLib\src\System\Convert.cs (7)
146
TypeCode.Boolean => v.
ToBoolean
(provider),
180
return value.
ToBoolean
(provider);
252
return ic.
ToBoolean
(provider);
317
return value == null ? false : ((IConvertible)value).
ToBoolean
(null);
322
return value == null ? false : ((IConvertible)value).
ToBoolean
(provider);
340
return ((IConvertible)value).
ToBoolean
(null);
412
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));