18 implementations of ToUInt16
Microsoft.Gen.Logging.Generated.Tests (1)
parent\TestClasses\FormattableTestExtensions.cs (1)
43public readonly ushort ToUInt16(IFormatProvider? provider) => throw new NotSupportedException();
System.Private.CoreLib (17)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Boolean.cs (1)
351ushort IConvertible.ToUInt16(IFormatProvider? provider)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Byte.cs (1)
201ushort IConvertible.ToUInt16(IFormatProvider? provider)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Char.cs (1)
609ushort IConvertible.ToUInt16(IFormatProvider? provider)
src\runtime\src\libraries\System.Private.CoreLib\src\System\DateTime.cs (1)
1955ushort IConvertible.ToUInt16(IFormatProvider? provider) => throw InvalidCast(nameof(UInt16));
src\runtime\src\libraries\System.Private.CoreLib\src\System\DBNull.cs (1)
67ushort IConvertible.ToUInt16(IFormatProvider? provider)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Decimal.cs (1)
1054ushort IConvertible.ToUInt16(IFormatProvider? provider)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Double.cs (1)
475ushort IConvertible.ToUInt16(IFormatProvider? provider)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Enum.cs (1)
2183ushort IConvertible.ToUInt16(IFormatProvider? provider) => Convert.ToUInt16(GetValue());
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int16.cs (1)
204ushort IConvertible.ToUInt16(IFormatProvider? provider)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int32.cs (1)
219ushort IConvertible.ToUInt16(IFormatProvider? provider)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int64.cs (1)
216ushort IConvertible.ToUInt16(IFormatProvider? provider)
src\runtime\src\libraries\System.Private.CoreLib\src\System\SByte.cs (1)
207ushort IConvertible.ToUInt16(IFormatProvider? provider)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Single.cs (1)
468ushort IConvertible.ToUInt16(IFormatProvider? provider)
src\runtime\src\libraries\System.Private.CoreLib\src\System\String.cs (1)
657ushort IConvertible.ToUInt16(IFormatProvider? provider)
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt16.cs (1)
198ushort IConvertible.ToUInt16(IFormatProvider? provider)
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt32.cs (1)
214ushort IConvertible.ToUInt16(IFormatProvider? provider)
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt64.cs (1)
213ushort IConvertible.ToUInt16(IFormatProvider? provider)
30 references to ToUInt16
Microsoft.CSharp (1)
Microsoft\CSharp\RuntimeBinder\ComInterop\DynamicVariantExtensions.cs (1)
65case TypeCode.UInt16: variant = ComVariant.Create(value.ToUInt16(ci)); break;
Microsoft.VisualBasic.Core (18)
Microsoft\VisualBasic\CompilerServices\Conversions.vb (15)
103Return CBool(ValueInterface.ToUInt16(Nothing)) 247Return CByte(ValueInterface.ToUInt16(Nothing)) 394Return CSByte(ValueInterface.ToUInt16(Nothing)) 537Return CShort(ValueInterface.ToUInt16(Nothing)) 683Return CUShort(ValueInterface.ToUInt16(Nothing)) 716Return ValueInterface.ToUInt16(Nothing) 826Return CInt(ValueInterface.ToUInt16(Nothing)) 971Return CUInt(ValueInterface.ToUInt16(Nothing)) 1117Return CLng(ValueInterface.ToUInt16(Nothing)) 1264Return CULng(ValueInterface.ToUInt16(Nothing)) 1423Return CDec(ValueInterface.ToUInt16(Nothing)) 1663Return CSng(ValueInterface.ToUInt16(Nothing)) 1808Return CDbl(ValueInterface.ToUInt16(Nothing)) 2274Return CStr(ValueInterface.ToUInt16(Nothing)) 2427Case TypeCode.UInt16 : Return CastUInt16Enum(iconv.ToUInt16(Nothing), TargetType)
Microsoft\VisualBasic\CompilerServices\ObjectType.vb (1)
3656Return iconv.ToUInt16(Nothing)
Microsoft\VisualBasic\Conversion.vb (2)
307Return Hex(ValueInterface.ToUInt16(Nothing)) 420Return Oct(ValueInterface.ToUInt16(Nothing))
System.Data.Common (3)
System\Data\Common\SQLConvert.cs (1)
525return ((IConvertible)(string)value).ToUInt16(formatProvider);
System\Data\Common\UInt16Storage.cs (2)
206value = ((IConvertible)value).ToUInt16(FormatProvider); 242_values[record] = ((IConvertible)value).ToUInt16(FormatProvider);
System.Private.CoreLib (6)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Convert.cs (6)
150TypeCode.UInt16 => v.ToUInt16(provider), 189return value.ToUInt16(provider); 261return ic.ToUInt16(provider); 869return value == null ? (ushort)0 : ((IConvertible)value).ToUInt16(null); 875return value == null ? (ushort)0 : ((IConvertible)value).ToUInt16(provider); 973return ((IConvertible)value).ToUInt16(null);
System.Windows.Forms.Design (2)
System\ComponentModel\Design\Serialization\CodeDomSerializerBase.cs (2)
1367ushort leftValue = left.ToUInt16(null); 1368ushort rightValue = right.ToUInt16(null);