144 references to MaxValue
BinaryFormatTests (4)
FormatTests\FormattedObject\ListTests.cs (2)
28sbyte.MaxValue, 96new List<sbyte>() { 0, -2, sbyte.MaxValue, sbyte.MinValue },
FormatTests\FormattedObject\PrimitiveTypeTests.cs (2)
62{ (byte)PrimitiveType.SByte, sbyte.MaxValue }, 126sbyte.MaxValue,
dotnet-svcutil-lib (3)
FrameworkFork\Microsoft.Xml\Xml\schema\DatatypeImplementation.cs (1)
3444private static readonly FacetsChecker s_numeric10FacetsChecker = new Numeric10FacetsChecker(sbyte.MinValue, sbyte.MaxValue);
FrameworkFork\Microsoft.Xml\Xml\schema\XmlValueConverter.cs (1)
927if (value < (int)SByte.MinValue || value > (int)SByte.MaxValue)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlReaderDelegator.cs (1)
460if (value < SByte.MinValue || value > SByte.MaxValue)
Microsoft.CodeAnalysis (2)
EnumConstantHelper.cs (1)
33overflowKind = CheckOverflow(sbyte.MaxValue, previous, offset);
ExtendedSpecialType.cs (1)
21Debug.Assert(value >= sbyte.MinValue && value <= sbyte.MaxValue);
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (2)
42{ sbyte.MaxValue, nameof(sbyte.MaxValue) },
Microsoft.CodeAnalysis.CSharp (5)
Binder\Binder_Conversions.cs (2)
3610case SpecialType.System_SByte: return (sbyte.MinValue - 1D) < value && value < (sbyte.MaxValue + 1D); 3640case SpecialType.System_SByte: return (sbyte.MinValue - 1M) < value && value < (sbyte.MaxValue + 1M);
Binder\Semantics\Conversions\ConversionsBase.cs (1)
1374return sbyte.MinValue <= value && value <= sbyte.MaxValue;
Utilities\ValueSetFactory.SByteTC.cs (2)
19sbyte INumericTC<sbyte>.MaxValue => sbyte.MaxValue; 44Debug.Assert(value != sbyte.MaxValue);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\CodeGenIncrementTests.cs (1)
90TestIncrementCompilationAndOutput<sbyte>(sbyte.MaxValue, sbyte.MinValue);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (2)
Attributes\AttributeTests_MarshalAs.cs (2)
488for (int i = 0; i < sbyte.MaxValue; i++) 634for (int i = 0; i < sbyte.MaxValue; i++)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (5)
Compilation\GetSemanticInfoTests.cs (4)
892EnumOffset(ConstantValue.Create((sbyte)(sbyte.MaxValue - 3)), 3, EnumOverflowKind.NoOverflow, ConstantValue.Create((sbyte)sbyte.MaxValue)); 893EnumOffset(ConstantValue.Create((sbyte)(sbyte.MaxValue - 3)), 4, EnumOverflowKind.OverflowReport, ConstantValue.Bad); 894EnumOffset(ConstantValue.Create((sbyte)(sbyte.MaxValue - 3)), 5, EnumOverflowKind.OverflowIgnore, ConstantValue.Bad);
Symbols\Source\CompletionTests.cs (1)
146for (int i = sbyte.MinValue; i <= sbyte.MaxValue; i++)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Syntax\SyntaxFactoryTests.cs (1)
316CheckLiteralToString(sbyte.MaxValue, @"127");
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
CodeGeneration\SyntaxGeneratorTests.cs (1)
154VerifySyntax<MemberAccessExpressionSyntax>(Generator.LiteralExpression(sbyte.MaxValue), "global::System.SByte.MaxValue");
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (2)
Attributes\AttributeTests_MarshalAs.vb (2)
389For i = 0 To SByte.MaxValue 517While i < SByte.MaxValue
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (2)
Semantics\Conversions.vb (2)
577New TypeAndValue(sbyteType, SByte.MaxValue), 1138New TypeAndValue(sbyteType, SByte.MaxValue),
Microsoft.CodeAnalysis.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (2)
42{ sbyte.MaxValue, nameof(sbyte.MaxValue) },
Microsoft.CodeAnalysis.Workspaces.UnitTests (5)
ObjectSerializationTests.cs (5)
279TestRoundTripValue(SByte.MaxValue); 414writer.WriteSByte(SByte.MaxValue); 438Assert.Equal(SByte.MaxValue, reader.ReadSByte()); 468writer.WriteScalarValue(SByte.MaxValue); 506Assert.Equal(SByte.MaxValue, (SByte)reader.ReadScalarValue());
Microsoft.CSharp (1)
Microsoft\CSharp\RuntimeBinder\Semantics\ExpressionBinder.cs (1)
1527if (value <= (ulong)sbyte.MaxValue)
Microsoft.Data.Analysis (3)
PrimitiveDataFrameColumnComputations.cs (3)
3769var ret = sbyte.MaxValue; 3986var value = sbyte.MaxValue; 4009var value = sbyte.MaxValue;
Microsoft.ML.Core (2)
Data\DataKind.cs (2)
171return (ulong)sbyte.MaxValue; 198return (ulong)sbyte.MaxValue;
Microsoft.ML.Core.Tests (2)
UnitTests\DataTypes.cs (2)
80sbyte maxValue = sbyte.MaxValue; 99src = (sbyte.MaxValue + 1).ToString().AsMemory();
Microsoft.ML.Data (2)
Data\Conversion.cs (2)
1220TryParseSigned(I1.MaxValue, in src, out long? res); 1453TryParseSigned(I1.MaxValue, in src, out long? res);
Microsoft.ML.Tests (8)
CollectionsDataViewTest.cs (2)
116fsByte = sbyte.MaxValue - 1, 131fsByte = sbyte.MaxValue,
TextLoaderTests.cs (2)
36string.Format("{0},{1},{2},{3}", sbyte.MaxValue, short.MaxValue, int.MaxValue, long.MaxValue), 54sbyte[] sByteTargets = new sbyte[] { sbyte.MinValue, sbyte.MaxValue, default };
Transformers\ConvertTests.cs (3)
158AF = new sbyte[]{ sbyte.MinValue, sbyte.MaxValue}, 226AF = new sbyte[]{ sbyte.MinValue, sbyte.MaxValue}, 238ConvF = new float[] { sbyte.MinValue, sbyte.MaxValue },
Transformers\HashTests.cs (1)
247if (value <= (ulong)sbyte.MaxValue)
Microsoft.ML.Transforms (1)
Expression\IlGeneratorExtensions.cs (1)
278if (sbyte.MinValue <= arg && arg <= sbyte.MaxValue)
Microsoft.VisualBasic.Core (3)
Microsoft\VisualBasic\CompilerServices\Operators.vb (3)
2829If result > SByte.MaxValue OrElse result < SByte.MinValue Then 3297If result < SByte.MinValue OrElse result > SByte.MaxValue Then 3737If result > SByte.MaxValue OrElse result < SByte.MinValue Then
System.Data.Common (1)
System\Data\Common\SByteStorage.cs (1)
102sbyte min = sbyte.MaxValue;
System.Private.CoreLib (54)
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Parser\Utf8Parser.Integer.Signed.D.cs (1)
70if ((uint)answer > (uint)sbyte.MaxValue + (-1 * sign + 1) / 2)
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Parser\Utf8Parser.Integer.Signed.N.cs (1)
63if (answer > sbyte.MaxValue + (-1 * sign + 1) / 2)
src\libraries\System.Private.CoreLib\src\System\Byte.cs (2)
1015sbyte actualResult = (value >= sbyte.MaxValue) ? sbyte.MaxValue : (sbyte)value;
src\libraries\System.Private.CoreLib\src\System\Char.cs (2)
1828sbyte actualResult = (value >= sbyte.MaxValue) ? sbyte.MaxValue : (sbyte)value;
src\libraries\System.Private.CoreLib\src\System\Convert.cs (9)
559if (value > sbyte.MaxValue) ThrowSByteOverflowException(); 566if (value > sbyte.MaxValue) ThrowSByteOverflowException(); 573if (value < sbyte.MinValue || value > sbyte.MaxValue) ThrowSByteOverflowException(); 580if (value > sbyte.MaxValue) ThrowSByteOverflowException(); 587if (value < sbyte.MinValue || value > sbyte.MaxValue) ThrowSByteOverflowException(); 594if (value > (uint)sbyte.MaxValue) ThrowSByteOverflowException(); 601if (value < sbyte.MinValue || value > sbyte.MaxValue) ThrowSByteOverflowException(); 608if (value > (ulong)sbyte.MaxValue) ThrowSByteOverflowException(); 2090if (r < sbyte.MinValue || r > sbyte.MaxValue)
src\libraries\System.Private.CoreLib\src\System\Decimal.cs (2)
1787sbyte actualResult = (value >= sbyte.MaxValue) ? sbyte.MaxValue :
src\libraries\System.Private.CoreLib\src\System\Enum.cs (1)
109if ((long)uint64Value < sbyte.MinValue || (long)uint64Value > sbyte.MaxValue) return null;
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NFloat.cs (2)
1728sbyte actualResult = (value >= sbyte.MaxValue) ? sbyte.MaxValue :
src\libraries\System.Private.CoreLib\src\System\SByte.cs (24)
551static sbyte IMinMaxValue<sbyte>.MaxValue => MaxValue; 927result = (actualValue >= MaxValue) ? MaxValue : 934result = (actualValue >= MaxValue) ? MaxValue : 941result = (actualValue >= MaxValue) ? MaxValue : 948result = (actualValue >= MaxValue) ? MaxValue : 955result = (actualValue >= MaxValue) ? MaxValue : 962result = (actualValue >= MaxValue) ? MaxValue : 969result = (actualValue >= MaxValue) ? MaxValue : 976result = (actualValue >= MaxValue) ? MaxValue : 1007result = (actualValue >= MaxValue) ? MaxValue : 1014result = (actualValue >= MaxValue) ? MaxValue : 1051result = (actualValue >= MaxValue) ? MaxValue : 1364static sbyte IBinaryIntegerParseAndFormatInfo<sbyte>.MaxValueDiv10 => MaxValue / 10;
src\libraries\System.Private.CoreLib\src\System\UInt128.cs (1)
1906sbyte actualResult = (value >= new UInt128(0x0000_0000_0000_0000, 0x0000_0000_0000_007F)) ? sbyte.MaxValue : (sbyte)value;
src\libraries\System.Private.CoreLib\src\System\UInt16.cs (2)
1034sbyte actualResult = (value >= sbyte.MaxValue) ? sbyte.MaxValue : (sbyte)value;
src\libraries\System.Private.CoreLib\src\System\UInt32.cs (2)
1079sbyte actualResult = (value >= (uint)sbyte.MaxValue) ? sbyte.MaxValue : (sbyte)value;
src\libraries\System.Private.CoreLib\src\System\UInt64.cs (2)
1072sbyte actualResult = (value >= (ulong)sbyte.MaxValue) ? sbyte.MaxValue : (sbyte)value;
src\libraries\System.Private.CoreLib\src\System\UIntPtr.cs (2)
1075sbyte actualResult = (value >= (nuint)sbyte.MaxValue) ? sbyte.MaxValue : (sbyte)value;
src\System\Reflection\Emit\RuntimeILGenerator.cs (1)
215if (updateAddr < sbyte.MinValue || updateAddr > sbyte.MaxValue)
System.Private.DataContractSerialization (1)
System\Runtime\Serialization\XmlReaderDelegator.cs (1)
594if (value < sbyte.MinValue || value > sbyte.MaxValue)
System.Private.Windows.Core.Tests (3)
System\Private\Windows\Ole\BinaryFormatUtilitiesTests.cs (2)
70new List<sbyte> { sbyte.MinValue, sbyte.MaxValue }, 90new sbyte[] { sbyte.MinValue, sbyte.MaxValue },
System\Value\StoringSByte.cs (1)
12{ sbyte.MaxValue },
System.Private.Xml (2)
System\Xml\Schema\DataTypeImplementation.cs (1)
3376private static readonly Numeric10FacetsChecker s_numeric10FacetsChecker = new Numeric10FacetsChecker(sbyte.MinValue, sbyte.MaxValue);
System\Xml\Schema\XmlValueConverter.cs (1)
842if (value < (int)sbyte.MinValue || value > (int)sbyte.MaxValue)
System.Runtime.Numerics (7)
System\Numerics\BigInteger.cs (3)
4780actualResult = IsNegative(value) ? sbyte.MinValue : sbyte.MaxValue; 4784actualResult = (value._sign >= sbyte.MaxValue) ? sbyte.MaxValue :
System\Numerics\Complex.cs (4)
1900sbyte actualResult = (value.m_real >= sbyte.MaxValue) ? sbyte.MaxValue : 2036sbyte actualResult = (value.m_real >= sbyte.MaxValue) ? sbyte.MaxValue :
System.Text.Json (1)
System\Text\Json\Reader\Utf8JsonReader.TryGet.cs (1)
342/// than <see cref="sbyte.MaxValue"/>.
System.Windows.Forms.Primitives.Tests (15)
Interop\Oleaut32\VARIANTTests.cs (15)
181yield return new object[] { VT_I1, (nint)sbyte.MaxValue, sbyte.MaxValue }; 212yield return new object[] { VT_I2, (nint)sbyte.MaxValue, (short)sbyte.MaxValue }; 242yield return new object[] { VT_I4, (nint)sbyte.MaxValue, (int)sbyte.MaxValue }; 273yield return new object[] { VT_INT, (nint)sbyte.MaxValue, (int)sbyte.MaxValue }; 308yield return new object[] { VT_ERROR, (nint)sbyte.MaxValue, (int)sbyte.MaxValue }; 401yield return new object[] { (nint)sbyte.MaxValue, (long)sbyte.MaxValue }; 427yield return new object[] { sbyte.MaxValue }; 690yield return new object[] { (nint)sbyte.MaxValue, (int)sbyte.MaxValue };
System.Windows.Forms.Tests (1)
System\Windows\Forms\AxHost.PropertyBagStreamTests.cs (1)
99sbyte.MaxValue,