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