19 implementations of ToInt16
Microsoft.AspNetCore.Mvc.TagHelpers.Test (1)
LinkTagHelperTest.cs (1)
1257public short ToInt16(IFormatProvider provider)
Microsoft.Build.Engine.UnitTests (1)
BackEnd\TaskBuilderTestTask.cs (1)
49public short ToInt16(IFormatProvider provider) => Value.ToInt16(provider);
Microsoft.Gen.Logging.Generated.Tests (1)
test\Generators\Microsoft.Gen.Logging\TestClasses\FormattableTestExtensions.cs (1)
37public readonly short ToInt16(IFormatProvider? provider) => throw new NotSupportedException();
System.Private.CoreLib (16)
src\libraries\System.Private.CoreLib\src\System\Boolean.cs (1)
346short IConvertible.ToInt16(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\Byte.cs (1)
202short IConvertible.ToInt16(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\Char.cs (1)
537short IConvertible.ToInt16(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\DateTime.cs (1)
1980short IConvertible.ToInt16(IFormatProvider? provider) => throw InvalidCast(nameof(Int16));
src\libraries\System.Private.CoreLib\src\System\DBNull.cs (1)
62short IConvertible.ToInt16(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\Decimal.cs (1)
1054short IConvertible.ToInt16(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\Double.cs (1)
472short IConvertible.ToInt16(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\Enum.cs (1)
2181short IConvertible.ToInt16(IFormatProvider? provider) => Convert.ToInt16(GetValue());
src\libraries\System.Private.CoreLib\src\System\Int16.cs (1)
205short IConvertible.ToInt16(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\Int32.cs (1)
220short IConvertible.ToInt16(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\Int64.cs (1)
217short IConvertible.ToInt16(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\SByte.cs (1)
208short IConvertible.ToInt16(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\Single.cs (1)
467short IConvertible.ToInt16(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\UInt16.cs (1)
199short IConvertible.ToInt16(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\UInt32.cs (1)
215short IConvertible.ToInt16(IFormatProvider? provider)
src\libraries\System.Private.CoreLib\src\System\UInt64.cs (1)
214short IConvertible.ToInt16(IFormatProvider? provider)
74 references to ToInt16
dotnet-svcutil-lib (1)
FrameworkFork\Microsoft.Xml\Xml\Serialization\CodeExporter.cs (1)
325return ((IConvertible)value).ToInt16(null);
Microsoft.Build.Engine.UnitTests (1)
BackEnd\TaskBuilderTestTask.cs (1)
49public short ToInt16(IFormatProvider provider) => Value.ToInt16(provider);
Microsoft.VisualBasic.Core (60)
Microsoft\VisualBasic\CompilerServices\BooleanType.vb (1)
84Return CBool(ValueInterface.ToInt16(Nothing))
Microsoft\VisualBasic\CompilerServices\ByteType.vb (1)
70Return CByte(ValueInterface.ToInt16(Nothing))
Microsoft\VisualBasic\CompilerServices\Conversions.vb (15)
96Return CBool(ValueInterface.ToInt16(Nothing)) 240Return CByte(ValueInterface.ToInt16(Nothing)) 387Return CSByte(ValueInterface.ToInt16(Nothing)) 530Return CShort(ValueInterface.ToInt16(Nothing)) 570Return ValueInterface.ToInt16(Nothing) 676Return CUShort(ValueInterface.ToInt16(Nothing)) 819Return CInt(ValueInterface.ToInt16(Nothing)) 964Return CUInt(ValueInterface.ToInt16(Nothing)) 1110Return CLng(ValueInterface.ToInt16(Nothing)) 1257Return CULng(ValueInterface.ToInt16(Nothing)) 1416Return CDec(ValueInterface.ToInt16(Nothing)) 1656Return CSng(ValueInterface.ToInt16(Nothing)) 1801Return CDbl(ValueInterface.ToInt16(Nothing)) 2271Return CStr(ValueInterface.ToInt16(Nothing)) 2426Case TypeCode.Int16 : Return CastInt16Enum(iconv.ToInt16(Nothing), TargetType)
Microsoft\VisualBasic\CompilerServices\DecimalType.vb (1)
78Return CDec(valueInterface.ToInt16(Nothing))
Microsoft\VisualBasic\CompilerServices\DoubleType.vb (1)
78Return CDbl(valueInterface.ToInt16(Nothing))
Microsoft\VisualBasic\CompilerServices\IntegerType.vb (1)
70Return CInt(ValueInterface.ToInt16(Nothing))
Microsoft\VisualBasic\CompilerServices\LongType.vb (1)
73Return CLng(ValueInterface.ToInt16(Nothing))
Microsoft\VisualBasic\CompilerServices\ObjectType.vb (34)
518Return ObjTstInt16(conv1.ToInt16(Nothing), 0) 521Return ObjTstInt16(0, conv2.ToInt16(Nothing)) 697Return ObjTstInt16(conv1.ToInt16(Nothing), conv2.ToInt16(Nothing)) 701Return ObjTstInt16(CShort(ToVBBool(conv1)), conv2.ToInt16(Nothing)) 705Return ObjTstInt16(conv1.ToInt16(Nothing), CShort(ToVBBool(conv2))) 985Int32Result = -CType(conv.ToInt16(Nothing), Int32) 1154int16Value = Not iconv.ToInt16(Nothing) 1695Return AddInt16(conv1.ToInt16(Nothing), conv2.ToInt16(Nothing)) 1699Return AddInt16(CShort(ToVBBool(conv1)), conv2.ToInt16(Nothing)) 1703Return AddInt16(conv1.ToInt16(Nothing), CShort(ToVBBool(conv2))) 1994Return SubInt16(conv1.ToInt16(Nothing), conv2.ToInt16(Nothing)) 1998Return SubInt16(CShort(ToVBBool(conv1)), conv2.ToInt16(Nothing)) 2002Return SubInt16(conv1.ToInt16(Nothing), CShort(ToVBBool(conv2))) 2296Return MulInt16(conv1.ToInt16(Nothing), conv2.ToInt16(Nothing)) 2300Return MulInt16(CShort(ToVBBool(conv1)), conv2.ToInt16(Nothing)) 2304Return MulInt16(conv1.ToInt16(Nothing), CShort(ToVBBool(conv2))) 2797Return ModInt16(conv1.ToInt16(Nothing), 0) 2938Return ModInt16(conv1.ToInt16(Nothing), conv2.ToInt16(Nothing)) 2942Return ModInt16(CShort(ToVBBool(conv1)), conv2.ToInt16(Nothing)) 2946Return ModInt16(conv1.ToInt16(Nothing), CShort(ToVBBool(conv2))) 3140Return IDivideInt16(conv1.ToInt16(Nothing), 0) 3158Return IDivideInt16(0, conv2.ToInt16(Nothing)) 3172Return IDivideInt16(CShort(ToVBBool(conv1)), conv2.ToInt16(Nothing)) 3192Return IDivideInt16(conv1.ToInt16(Nothing), CShort(ToVBBool(conv2))) 3210Return IDivideInt16(conv1.ToInt16(Nothing), conv2.ToInt16(Nothing)) 3364Return conv1.ToInt16(Nothing) << amount 3401Return conv1.ToInt16(Nothing) >> amount 3653Return iconv.ToInt16(Nothing)
Microsoft\VisualBasic\CompilerServices\ShortType.vb (1)
70Return CShort(ValueInterface.ToInt16(Nothing))
Microsoft\VisualBasic\CompilerServices\SingleType.vb (1)
84Return CSng(ValueInterface.ToInt16(Nothing))
Microsoft\VisualBasic\CompilerServices\StringType.vb (1)
121Return FromShort(ValueInterface.ToInt16(Nothing))
Microsoft\VisualBasic\Conversion.vb (2)
304Return Hex(ValueInterface.ToInt16(Nothing)) 418Return Oct(ValueInterface.ToInt16(Nothing))
System.Data.Common (3)
System\Data\Common\Int16Storage.cs (2)
207value = ((IConvertible)value).ToInt16(FormatProvider); 243_values[record] = ((IConvertible)value).ToInt16(FormatProvider);
System\Data\Common\SQLConvert.cs (1)
523return ((IConvertible)(string)value).ToInt16(formatProvider);
System.Private.CoreLib (7)
src\libraries\System.Private.CoreLib\src\System\AppContextConfigHelper.cs (1)
189result = convertible.ToInt16(NumberFormatInfo.InvariantInfo);
src\libraries\System.Private.CoreLib\src\System\Convert.cs (6)
150TypeCode.Int16 => v.ToInt16(provider), 188return value.ToInt16(provider); 260return ic.ToInt16(provider); 760return value == null ? (short)0 : ((IConvertible)value).ToInt16(null); 765return value == null ? (short)0 : ((IConvertible)value).ToInt16(provider); 859return ((IConvertible)value).ToInt16(null);
System.Windows.Forms.Design (2)
System\ComponentModel\Design\Serialization\CodeDomSerializerBase.cs (2)
1351short leftValue = left.ToInt16(null); 1352short rightValue = right.ToInt16(null);