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