133 references to MinValue
BinaryFormatTests (2)
FormatTests\FormattedObject\ListTests.cs (1)
98new List<short>() { 0, -2, short.MinValue, short.MaxValue },
FormatTests\FormattedObject\PrimitiveTypeTests.cs (1)
56{ (byte)PrimitiveType.Int16, short.MinValue },
dotnet-svcutil-lib (4)
FrameworkFork\Microsoft.Xml\Xml\schema\DatatypeImplementation.cs (1)
3388private static readonly FacetsChecker s_numeric10FacetsChecker = new Numeric10FacetsChecker(short.MinValue, short.MaxValue);
FrameworkFork\Microsoft.Xml\Xml\schema\XmlValueConverter.cs (1)
919if (value < (int)Int16.MinValue || value > (int)Int16.MaxValue)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlReaderDelegator.cs (1)
423if (value < short.MinValue || value > short.MaxValue)
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlDictionaryReader.cs (1)
963if (i < Int16.MinValue || i > Int16.MaxValue)
Microsoft.AspNetCore.Components.Server (2)
src\submodules\MessagePack-CSharp\src\MessagePack.UnityClient\Assets\Scripts\MessagePack\MessagePackWriter.cs (2)
423else if (value >= short.MinValue) 542else if (value >= short.MinValue)
Microsoft.AspNetCore.Http.Extensions.Tests (1)
RequestDelegateGenerator\RequestDelegateCreationTests.SpecialTypes.cs (1)
201new object[] {"short", "short.MinValue", short.MinValue, true },
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (2)
47{ short.MinValue, nameof(short.MinValue) },
Microsoft.CodeAnalysis.CSharp (5)
Binder\Binder_Conversions.cs (2)
3611case SpecialType.System_Int16: return (short.MinValue - 1D) < value && value < (short.MaxValue + 1D); 3641case SpecialType.System_Int16: return (short.MinValue - 1M) < value && value < (short.MaxValue + 1M);
Binder\Semantics\Conversions\ConversionsBase.cs (1)
1376return short.MinValue <= value && value <= short.MaxValue;
Utilities\ValueSetFactory.ShortTC.cs (2)
18short INumericTC<short>.MinValue => short.MinValue; 51Debug.Assert(value != short.MinValue);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\CodeGenIncrementTests.cs (1)
102TestIncrementCompilationAndOutput<short>(short.MaxValue, short.MinValue);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
Emit\NumericIntPtrTests.cs (1)
2435F({short.MinValue - 1});
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\NativeIntegerTests.cs (1)
6569F({short.MinValue - 1});
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (4)
Compilation\GetSemanticInfoTests.cs (4)
904EnumOffset(ConstantValue.Create((short)short.MinValue), 1, EnumOverflowKind.NoOverflow, ConstantValue.Create((short)(short.MinValue + 1))); 905EnumOffset(ConstantValue.Create((short)short.MinValue), 2, EnumOverflowKind.NoOverflow, ConstantValue.Create((short)(short.MinValue + 2)));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Syntax\SyntaxFactoryTests.cs (1)
324CheckLiteralToString(short.MinValue, @"-32768");
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
CodeGeneration\SyntaxGeneratorTests.cs (1)
134VerifySyntax<MemberAccessExpressionSyntax>(Generator.LiteralExpression(short.MinValue), "global::System.Int16.MinValue");
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\EnumMemberGenerator.vb (1)
118value >= Short.MinValue AndAlso value <= Short.MaxValue Then
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\EnumMemberGenerator.vb (1)
118value >= Short.MinValue AndAlso value <= Short.MaxValue Then
Microsoft.CodeAnalysis.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (2)
47{ short.MinValue, nameof(short.MinValue) },
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
ObjectSerializationTests.cs (1)
366TestRoundTripValue<Int64>(Int16.MinValue);
Microsoft.Data.Analysis (3)
PrimitiveDataFrameColumnComputations.cs (3)
4192var ret = short.MinValue; 4425var value = short.MinValue; 4448var value = short.MinValue;
Microsoft.ML.Core (1)
Data\DataKind.cs (1)
230return short.MinValue;
Microsoft.ML.Core.Tests (1)
UnitTests\DataTypes.cs (1)
119short minValue = short.MinValue;
Microsoft.ML.Data (1)
DataLoadSave\Binary\Codecs.cs (1)
746value = new DateTimeOffset(new DateTime(ticks == long.MinValue ? default : ticks), new TimeSpan(0, offset == short.MinValue ? default : offset, 0));
Microsoft.ML.Tests (6)
CollectionsDataViewTest.cs (1)
152fShort = short.MinValue + 1,
TextLoaderTests.cs (2)
35string.Format("{0},{1},{2},{3}", sbyte.MinValue, short.MinValue, int.MinValue, long.MinValue), 55short[] shortTargets = new short[] { short.MinValue, short.MaxValue, default };
Transformers\ConvertTests.cs (3)
159AG = new short[]{ short.MinValue, short.MaxValue}, 227AG = new short[]{ short.MinValue, short.MaxValue}, 239ConvG = new float[] { short.MinValue, short.MaxValue },
Microsoft.VisualBasic.Core (14)
Microsoft\VisualBasic\CompilerServices\ObjectType.vb (5)
1754If result >= Short.MinValue AndAlso result <= Short.MaxValue Then 2068If result >= Short.MinValue AndAlso result <= Short.MaxValue Then 2362ElseIf result >= Int16.MinValue AndAlso result <= Int16.MaxValue Then 2372If result >= Short.MinValue AndAlso result <= Short.MaxValue Then 3010If result < Int16.MinValue OrElse result > Int16.MaxValue Then
Microsoft\VisualBasic\CompilerServices\Operators.vb (7)
1077If operand = Int16.MinValue Then 1078Return -CInt(Int16.MinValue) 2840If result > Int16.MaxValue OrElse result < Int16.MinValue Then 3308If result < Int16.MinValue OrElse result > Int16.MaxValue Then 3748If result > Int16.MaxValue OrElse result < Int16.MinValue Then 4992If left = Short.MinValue AndAlso right = -1 Then 4993Return -CInt(Short.MinValue)
Microsoft\VisualBasic\Conversion.vb (2)
617ivalue = Int16.MinValue + (ivalue And &H7FFFL) 688ivalue = Int16.MinValue + (ivalue And &H7FFFL)
PresentationCore (1)
MS\Internal\TextFormatting\ThousandthOfEmRealDoubles.cs (1)
262if (scaled > short.MaxValue || scaled < short.MinValue)
PresentationFramework (1)
System\Windows\Markup\Baml2006\Baml2006KnownTypes.cs (1)
2033typeId = Int16.MinValue;
ReachFramework (1)
PrintConfig\PrintSchemaShim.cs (1)
1072devMode.Scale = Clamp(scale, short.MinValue, short.MaxValue);
System.Data.Common (8)
System\Data\Common\Int16Storage.cs (1)
123short max = short.MinValue;
System\Data\SQLTypes\SQLInt16.cs (7)
142if ((x.m_value == short.MinValue) && (y.m_value == -1)) 158if ((x.m_value == short.MinValue) && (y.m_value == -1)) 206if (value > short.MaxValue || value < short.MinValue) 219if (value > short.MaxValue || value < short.MinValue) 232if (value < short.MinValue || value > short.MaxValue) 245if (value < short.MinValue || value > short.MaxValue) 526public static readonly SqlInt16 MinValue = new SqlInt16(short.MinValue);
System.Drawing.Common.Tests (5)
System\Drawing\Imaging\EncoderParameterTests.cs (1)
57[InlineData(short.MinValue)]
System\Drawing\Imaging\MetaHeaderTests.cs (1)
24[InlineData(short.MinValue)]
System\Drawing\Imaging\PropertyItemTests.cs (1)
66yield return new object[] { int.MinValue, int.MinValue, short.MinValue, new byte[2] { 1, 1 } };
System\Drawing\Imaging\WmfPlaceableFileHeaderTests.cs (1)
26[InlineData(short.MinValue)]
System\Drawing\Printing\PrinterSettingsTests.cs (1)
71[InlineData(short.MinValue)]
System.Formats.Asn1 (1)
System\Formats\Asn1\AsnWriter.Integer.cs (1)
126else if (value >= short.MinValue)
System.Private.CoreLib (27)
src\libraries\System.Private.CoreLib\src\System\Convert.cs (3)
799if (value < short.MinValue || value > short.MaxValue) ThrowInt16OverflowException(); 817if (value < short.MinValue || value > short.MaxValue) ThrowInt16OverflowException(); 2115if (r < short.MinValue || r > short.MaxValue)
src\libraries\System.Private.CoreLib\src\System\Decimal.cs (2)
1754(value <= short.MinValue) ? short.MinValue : (short)value;
src\libraries\System.Private.CoreLib\src\System\Enum.cs (1)
117if ((long)uint64Value < short.MinValue || (long)uint64Value > short.MaxValue) return null;
src\libraries\System.Private.CoreLib\src\System\Int16.cs (19)
585static short IMinMaxValue<short>.MinValue => MinValue; 965(actualValue <= MinValue) ? MinValue : (short)actualValue; 972(actualValue <= BitConverter.UInt16BitsToHalf(0xF800)) ? MinValue : (short)actualValue; 979(actualValue <= MinValue) ? MinValue : (short)actualValue; 986(actualValue <= MinValue) ? MinValue : (short)actualValue; 993(actualValue <= MinValue) ? MinValue : (short)actualValue; 1000(actualValue <= MinValue) ? MinValue : (short)actualValue; 1013(actualValue <= MinValue) ? MinValue : (short)actualValue; 1044(actualValue <= MinValue) ? MinValue : (short)actualValue; 1051(actualValue <= BitConverter.UInt16BitsToHalf(0xF800)) ? MinValue : (short)actualValue; 1088(actualValue <= MinValue) ? MinValue : (short)actualValue;
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NFloat.cs (2)
1694(value <= short.MinValue) ? short.MinValue : (short)value;
System.Private.DataContractSerialization (3)
System\Runtime\Serialization\XmlReaderDelegator.cs (1)
556if (value < short.MinValue || value > short.MaxValue)
System\Xml\XmlBinaryWriter.cs (1)
724if (f >= short.MinValue && f <= short.MaxValue && (i = (int)f) == f)
System\Xml\XmlDictionaryReader.cs (1)
1075if (i < short.MinValue || i > short.MaxValue)
System.Private.Windows.Core.Tests (4)
System\Private\Windows\Ole\BinaryFormatUtilitiesTests.cs (2)
71new List<short> { short.MinValue, short.MaxValue }, 91new short[] { short.MinValue, short.MaxValue },
System\Value\StoringEnum.cs (1)
165MinValue = short.MinValue,
System\Value\StoringShort.cs (1)
13{ short.MinValue }
System.Private.Xml (2)
System\Xml\Schema\DataTypeImplementation.cs (1)
3322private static readonly Numeric10FacetsChecker s_numeric10FacetsChecker = new Numeric10FacetsChecker(short.MinValue, short.MaxValue);
System\Xml\Schema\XmlValueConverter.cs (1)
834if (value < (int)short.MinValue || value > (int)short.MaxValue)
System.Runtime.Numerics (7)
System\Numerics\BigInteger.cs (3)
4719actualResult = IsNegative(value) ? short.MinValue : short.MaxValue; 4724(value._sign <= short.MinValue) ? short.MinValue : (short)value._sign;
System\Numerics\Complex.cs (4)
1860(value.m_real <= short.MinValue) ? short.MinValue : (short)value.m_real; 1996(value.m_real <= short.MinValue) ? short.MinValue : (short)value.m_real;
System.Text.Json (1)
System\Text\Json\Reader\Utf8JsonReader.TryGet.cs (1)
376/// is written in scientific notation) or, it represents a number less than <see cref="short.MinValue"/> or greater
System.Windows.Forms.Primitives.Tests (14)
Interop\Oleaut32\VARIANTTests.cs (14)
176yield return new object[] { VT_I1, (nint)short.MinValue, (sbyte)0 }; 207yield return new object[] { VT_I2, (nint)short.MinValue, short.MinValue }; 237yield return new object[] { VT_I4, (nint)short.MinValue, (int)short.MinValue }; 268yield return new object[] { VT_INT, (nint)short.MinValue, (int)short.MinValue }; 303yield return new object[] { VT_ERROR, (nint)short.MinValue, (int)short.MinValue }; 394yield return new object[] { (nint)short.MinValue, (long)short.MinValue }; 422yield return new object[] { short.MinValue }; 685yield return new object[] { (nint)short.MinValue, (int)short.MinValue };
WindowsFormsIntegration (2)
System\Windows\Integration\WindowsFormsHost.cs (2)
799this.Location = new SD.Point(short.MinValue, short.MinValue);