19 implementations of ToByte
Microsoft.AspNetCore.Mvc.TagHelpers.Test (1)
LinkTagHelperTest.cs (1)
1232
public byte
ToByte
(IFormatProvider provider)
Microsoft.Build.Engine.UnitTests (1)
BackEnd\TaskBuilderTestTask.cs (1)
44
public byte
ToByte
(IFormatProvider provider) => Value.ToByte(provider);
Microsoft.Gen.Logging.Generated.Tests (1)
test\Generators\Microsoft.Gen.Logging\TestClasses\FormattableTestExtensions.cs (1)
32
public readonly byte
ToByte
(IFormatProvider? provider) => throw new NotSupportedException();
System.Private.CoreLib (16)
src\libraries\System.Private.CoreLib\src\System\Boolean.cs (1)
341
byte IConvertible.
ToByte
(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\Byte.cs (1)
197
byte IConvertible.
ToByte
(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\Char.cs (1)
532
byte IConvertible.
ToByte
(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\DateTime.cs (1)
1979
byte IConvertible.
ToByte
(IFormatProvider? provider) => throw InvalidCast(nameof(Byte));
src\libraries\System.Private.CoreLib\src\System\DBNull.cs (1)
57
byte IConvertible.
ToByte
(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\Decimal.cs (1)
1049
byte IConvertible.
ToByte
(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\Double.cs (1)
467
byte IConvertible.
ToByte
(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\Enum.cs (1)
2180
byte IConvertible.
ToByte
(IFormatProvider? provider) => Convert.ToByte(GetValue());
src\libraries\System.Private.CoreLib\src\System\Int16.cs (1)
200
byte IConvertible.
ToByte
(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\Int32.cs (1)
215
byte IConvertible.
ToByte
(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\Int64.cs (1)
212
byte IConvertible.
ToByte
(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\SByte.cs (1)
203
byte IConvertible.
ToByte
(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\Single.cs (1)
462
byte IConvertible.
ToByte
(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\UInt16.cs (1)
194
byte IConvertible.
ToByte
(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\UInt32.cs (1)
210
byte IConvertible.
ToByte
(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\UInt64.cs (1)
209
byte IConvertible.
ToByte
(IFormatProvider? provider)
61 references to ToByte
Microsoft.Build.Engine.UnitTests (1)
BackEnd\TaskBuilderTestTask.cs (1)
44
public byte ToByte(IFormatProvider provider) => Value.
ToByte
(provider);
Microsoft.VisualBasic.Core (49)
Microsoft\VisualBasic\CompilerServices\BooleanType.vb (1)
76
Return CBool(ValueInterface.
ToByte
(Nothing))
Microsoft\VisualBasic\CompilerServices\ByteType.vb (1)
63
Return CByte(ValueInterface.
ToByte
(Nothing))
Microsoft\VisualBasic\CompilerServices\Conversions.vb (15)
89
Return CBool(ValueInterface.
ToByte
(Nothing))
233
Return CByte(ValueInterface.
ToByte
(Nothing))
280
Return ValueInterface.
ToByte
(Nothing)
380
Return CSByte(ValueInterface.
ToByte
(Nothing))
523
Return CShort(ValueInterface.
ToByte
(Nothing))
669
Return CUShort(ValueInterface.
ToByte
(Nothing))
812
Return CInt(ValueInterface.
ToByte
(Nothing))
957
Return CUInt(ValueInterface.
ToByte
(Nothing))
1103
Return CLng(ValueInterface.
ToByte
(Nothing))
1250
Return CULng(ValueInterface.
ToByte
(Nothing))
1409
Return CDec(ValueInterface.
ToByte
(Nothing))
1649
Return CSng(ValueInterface.
ToByte
(Nothing))
1794
Return CDbl(ValueInterface.
ToByte
(Nothing))
2268
Return CStr(ValueInterface.
ToByte
(Nothing))
2425
Case TypeCode.Byte : Return CastByteEnum(iconv.
ToByte
(Nothing), TargetType)
Microsoft\VisualBasic\CompilerServices\DecimalType.vb (1)
75
Return CDec(valueInterface.
ToByte
(Nothing))
Microsoft\VisualBasic\CompilerServices\DoubleType.vb (1)
71
Return CDbl(valueInterface.
ToByte
(Nothing))
Microsoft\VisualBasic\CompilerServices\IntegerType.vb (1)
63
Return CInt(ValueInterface.
ToByte
(Nothing))
Microsoft\VisualBasic\CompilerServices\LongType.vb (1)
66
Return CLng(ValueInterface.
ToByte
(Nothing))
Microsoft\VisualBasic\CompilerServices\ObjectType.vb (23)
506
Return ObjTstByte(conv1.
ToByte
(Nothing), 0)
509
Return ObjTstByte(0, conv2.
ToByte
(Nothing))
711
Return ObjTstByte(conv1.
ToByte
(Nothing), conv2.
ToByte
(Nothing))
977
Int16Result = -CType(conv.
ToByte
(Nothing), Int16)
1146
byteValue = Not iconv.
ToByte
(Nothing)
1709
Return AddByte(conv1.
ToByte
(Nothing), conv2.
ToByte
(Nothing))
2008
Return SubByte(conv1.
ToByte
(Nothing), conv2.
ToByte
(Nothing))
2310
Return MulByte(conv1.
ToByte
(Nothing), conv2.
ToByte
(Nothing))
2791
Return ModByte(conv1.
ToByte
(Nothing), 0)
2818
Return ModByte(0, conv2.
ToByte
(Nothing))
2954
Return ModByte(conv1.
ToByte
(Nothing), conv2.
ToByte
(Nothing))
3137
Return IDivideByte(conv1.
ToByte
(Nothing), 0)
3155
Return IDivideByte(0, conv2.
ToByte
(Nothing))
3204
Return IDivideByte(conv1.
ToByte
(Nothing), conv2.
ToByte
(Nothing))
3362
Return conv1.
ToByte
(Nothing) << amount
3399
Return conv1.
ToByte
(Nothing) >> amount
3647
Return iconv.
ToByte
(Nothing)
Microsoft\VisualBasic\CompilerServices\ShortType.vb (1)
63
Return CShort(ValueInterface.
ToByte
(Nothing))
Microsoft\VisualBasic\CompilerServices\SingleType.vb (1)
77
Return CSng(ValueInterface.
ToByte
(Nothing))
Microsoft\VisualBasic\CompilerServices\StringType.vb (1)
118
Return FromByte(ValueInterface.
ToByte
(Nothing))
Microsoft\VisualBasic\Conversion.vb (2)
301
Return Hex(ValueInterface.
ToByte
(Nothing))
416
Return Oct(ValueInterface.
ToByte
(Nothing))
System.Data.Common (3)
System\Data\Common\ByteStorage.cs (2)
193
value = ((IConvertible)value).
ToByte
(FormatProvider);
229
_values[record] = ((IConvertible)value).
ToByte
(FormatProvider);
System\Data\Common\SQLConvert.cs (1)
521
return ((IConvertible)(string)value).
ToByte
(formatProvider);
System.Private.CoreLib (6)
src\libraries\System.Private.CoreLib\src\System\Convert.cs (6)
149
TypeCode.Byte => v.
ToByte
(provider),
186
return value.
ToByte
(provider);
258
return ic.
ToByte
(provider);
657
return value == null ? (byte)0 : ((IConvertible)value).
ToByte
(null);
662
return value == null ? (byte)0 : ((IConvertible)value).
ToByte
(provider);
750
return ((IConvertible)value).
ToByte
(null);
System.Windows.Forms.Design (2)
System\ComponentModel\Design\Serialization\CodeDomSerializerBase.cs (2)
1335
byte leftValue = left.
ToByte
(null);
1336
byte rightValue = right.
ToByte
(null);