325 references to MaxValue
BinaryFormatTests (3)
FormatTests\FormattedObject\ListTests.cs (1)
27byte.MaxValue,
FormatTests\FormattedObject\PrimitiveTypeTests.cs (2)
65{ (byte)PrimitiveType.Byte, byte.MaxValue }, 125byte.MaxValue,
dotnet-svcutil-lib (5)
FrameworkFork\Microsoft.Xml\Xml\schema\DatatypeImplementation.cs (1)
3699private static readonly FacetsChecker s_numeric10FacetsChecker = new Numeric10FacetsChecker(byte.MinValue, byte.MaxValue);
FrameworkFork\Microsoft.Xml\Xml\schema\XmlValueConverter.cs (1)
911if (value < (int)Byte.MinValue || value > (int)Byte.MaxValue)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlReaderDelegator.cs (1)
441if (value < byte.MinValue || value > byte.MaxValue)
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBinaryWriter.cs (2)
699if (charCount <= byte.MaxValue / maxBytesPerChar) 718DiagnosticUtility.DebugAssert(length <= byte.MaxValue, "");
InMemory.FunctionalTests (2)
Http2\Http2StreamTests.cs (1)
3052s.Span[0] = byte.MaxValue;
Http3\Http3StreamTests.cs (1)
2872sourceData[i] = (byte)(i % byte.MaxValue);
Microsoft.AspNetCore.Components.Server (8)
src\submodules\MessagePack-CSharp\src\MessagePack.UnityClient\Assets\Scripts\MessagePack\MessagePackWriter.cs (8)
265else if (value <= byte.MaxValue) 357else if (value <= byte.MaxValue) 468else if (value <= byte.MaxValue) 797if (length <= byte.MaxValue) 886else if (byteCount <= byte.MaxValue && !this.OldSpec) 1006if (dataLength <= byte.MaxValue) 1221else if (characterLength <= byte.MaxValue && !this.OldSpec) 1258else if (byteCount <= byte.MaxValue && !this.OldSpec)
Microsoft.AspNetCore.Mvc.Core.Test (2)
ModelBinding\ModelBindingHelperTest.cs (2)
990[InlineData(byte.MaxValue, typeof(ByteEnum), ByteEnum.MaxValue)] 1604MaxValue = byte.MaxValue
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Internal\Http\HttpMethod.cs (1)
76None = byte.MaxValue,
Microsoft.Build.Engine.UnitTests (1)
BuildEventArgsSerialization_Tests.cs (1)
1111binaryWriter.Write(Enumerable.Repeat(byte.MaxValue, eventSize).ToArray());
Microsoft.CodeAnalysis (7)
Emit\EditAndContinueMethodDebugInformation.cs (1)
344if (relativeOrdinal > byte.MaxValue)
EnumConstantHelper.cs (1)
43overflowKind = CheckOverflow(byte.MaxValue, previous, offset);
MetadataReader\PEModule.cs (2)
975if (packingSize > byte.MaxValue) 2502Debug.Assert(signatureIndex >= 0 && signatureIndex <= byte.MaxValue);
src\Dependencies\CodeAnalysis.Debugging\CustomDebugInfoEncoder.cs (2)
42/// <exception cref="InvalidOperationException">More than <see cref="byte.MaxValue"/> records added.</exception> 50Debug.Assert(_recordCount <= byte.MaxValue);
Syntax\GreenNode.cs (1)
159Debug.Assert(value <= byte.MaxValue);
Microsoft.CodeAnalysis.CodeStyle (4)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (4)
384else if (v >= 0 && v < byte.MaxValue) 407else if (v >= 0 && v < byte.MaxValue) 426if (value <= (byte.MaxValue >> 2)) 469if (id <= byte.MaxValue)
Microsoft.CodeAnalysis.CSharp (8)
Binder\Binder_Conversions.cs (2)
3605case SpecialType.System_Byte: return (byte.MinValue - 1D) < value && value < (byte.MaxValue + 1D); 3635case SpecialType.System_Byte: return (byte.MinValue - 1M) < value && value < (byte.MaxValue + 1M);
Binder\Semantics\Conversions\ConversionsBase.cs (1)
1372return byte.MinValue <= value && value <= byte.MaxValue;
BoundTree\BoundNode.cs (1)
78kind == (BoundKind)byte.MaxValue || // used in SpillSequenceSpiller
Lowering\SpillSequenceSpiller.cs (1)
19private const BoundKind SpillSequenceBuilderKind = (BoundKind)byte.MaxValue;
Utilities\ValueSetFactory.ByteTC.cs (3)
20byte INumericTC<byte>.MaxValue => byte.MaxValue; 45Debug.Assert(value != byte.MaxValue); 63return (byte)random.Next(byte.MinValue, byte.MaxValue + 1);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\CodeGenIncrementTests.cs (1)
96TestIncrementCompilationAndOutput<byte>(byte.MaxValue, byte.MinValue);
Microsoft.CodeAnalysis.CSharp.Features (1)
ReverseForStatement\CSharpReverseForStatementCodeRefactoringProvider.cs (1)
96SpecialType.System_Byte => IsUnsignedBoundary(startValue, endValue, byte.MaxValue),
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\ConstantTests.cs (1)
4009sbyteConst = ConstantValue.Create(unchecked((sbyte)byte.MaxValue)),
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (12)
Compilation\GetSemanticInfoTests.cs (4)
899EnumOffset(ConstantValue.Create((byte)(byte.MaxValue - 3)), 3, EnumOverflowKind.NoOverflow, ConstantValue.Create((byte)byte.MaxValue)); 900EnumOffset(ConstantValue.Create((byte)(byte.MaxValue - 3)), 4, EnumOverflowKind.OverflowReport, ConstantValue.Bad); 901EnumOffset(ConstantValue.Create((byte)(byte.MaxValue - 3)), 5, EnumOverflowKind.OverflowIgnore, ConstantValue.Bad);
Symbols\Metadata\MetadataMemberTests.cs (8)
704options = options.WithMetadataImportOptions((MetadataImportOptions)byte.MaxValue); 705Assert.Equal((MetadataImportOptions)byte.MaxValue, options.MetadataImportOptions); 719commonOptions = commonOptions.WithMetadataImportOptions((MetadataImportOptions)byte.MaxValue); 720Assert.Equal((MetadataImportOptions)byte.MaxValue, ((CSharpCompilationOptions)commonOptions).MetadataImportOptions); 755compilation = compilation.WithOptions(options.WithMetadataImportOptions((MetadataImportOptions)byte.MaxValue)); 782options = TestOptions.DebugDll.WithMetadataImportOptions((MetadataImportOptions)byte.MaxValue); 783Assert.Equal((MetadataImportOptions)byte.MaxValue, options.MetadataImportOptions); 810compilation = compilation.WithOptions(TestOptions.DebugDll.WithMetadataImportOptions((MetadataImportOptions)byte.MaxValue));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Syntax\SyntaxFactoryTests.cs (1)
311CheckLiteralToString(byte.MaxValue, @"255");
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
CodeGeneration\SyntaxGeneratorTests.cs (1)
163VerifySyntax<LiteralExpressionSyntax>(Generator.LiteralExpression(byte.MaxValue), "255");
Microsoft.CodeAnalysis.Debugging.Package (2)
CustomDebugInfoEncoder.cs (2)
42/// <exception cref="InvalidOperationException">More than <see cref="byte.MaxValue"/> records added.</exception> 50Debug.Assert(_recordCount <= byte.MaxValue);
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
CustomTypeInfo.cs (1)
99if (length > byte.MaxValue)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (1)
src\ExpressionEvaluator\Core\Source\ExpressionCompiler\CustomTypeInfo.cs (1)
99if (length > byte.MaxValue)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (1)
src\ExpressionEvaluator\Core\Source\ExpressionCompiler\CustomTypeInfo.cs (1)
99if (length > byte.MaxValue)
Microsoft.CodeAnalysis.Features (2)
src\Dependencies\CodeAnalysis.Debugging\CustomDebugInfoEncoder.cs (2)
42/// <exception cref="InvalidOperationException">More than <see cref="byte.MaxValue"/> records added.</exception> 50Debug.Assert(_recordCount <= byte.MaxValue);
Microsoft.CodeAnalysis.Scripting.Desktop.UnitTests (2)
MetadataShadowCopyProviderTests.cs (2)
69Assert.Throws<ArgumentOutOfRangeException>(() => _provider.GetMetadataShadowCopy(IsRunningOnMono ? "/goo.dll" : @"c:\goo.dll", (MetadataImageKind)Byte.MaxValue)); 76Assert.Throws<ArgumentOutOfRangeException>(() => _provider.GetMetadata(IsRunningOnMono ? "/goo.dll" : @"c:\goo.dll", (MetadataImageKind)Byte.MaxValue));
Microsoft.CodeAnalysis.UnitTests (1)
MetadataReferences\MetadataReferencePropertiesTests.cs (1)
42Assert.Throws<ArgumentOutOfRangeException>(() => new MetadataReferenceProperties((MetadataImageKind)byte.MaxValue));
Microsoft.CodeAnalysis.VisualBasic (2)
Semantics\OverloadResolution.vb (2)
2079Dim theOnlyInferenceLevel As TypeArgumentInference.InferenceLevel = CType(Byte.MaxValue, TypeArgumentInference.InferenceLevel) 2088If theOnlyInferenceLevel = Byte.MaxValue Then
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (2)
Semantics\Conversions.vb (2)
581New TypeAndValue(byteType, Byte.MaxValue), 1142New TypeAndValue(byteType, Byte.MaxValue),
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (10)
SymbolDisplay\ObjectDisplayTests.vb (2)
18Assert.Equal("255", FormatPrimitive(Byte.MaxValue)) 45Assert.Equal("&HFF", FormatPrimitiveUsingHexadecimalNumbers(Byte.MaxValue))
SymbolsTests\Metadata\MetadataMemberTests.vb (8)
953options = options.WithMetadataImportOptions(CType(Byte.MaxValue, MetadataImportOptions)) 954Assert.Equal(CType(Byte.MaxValue, MetadataImportOptions), options.MetadataImportOptions) 968commonOptions = commonOptions.WithMetadataImportOptions(CType(Byte.MaxValue, MetadataImportOptions)) 969Assert.Equal(CType(Byte.MaxValue, MetadataImportOptions), DirectCast(commonOptions, VisualBasicCompilationOptions).MetadataImportOptions) 1005compilation = compilation.WithOptions(options.WithMetadataImportOptions(CType(Byte.MaxValue, MetadataImportOptions))) 1034options = New VisualBasicCompilationOptions(OutputKind.DynamicallyLinkedLibrary, metadataImportOptions:=CType(Byte.MaxValue, MetadataImportOptions)) 1035Assert.Equal(CType(Byte.MaxValue, MetadataImportOptions), options.MetadataImportOptions) 1063compilation = compilation.WithOptions(New VisualBasicCompilationOptions(OutputKind.DynamicallyLinkedLibrary, metadataImportOptions:=CType(Byte.MaxValue, MetadataImportOptions)))
Microsoft.CodeAnalysis.Workspaces (4)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (4)
384else if (v >= 0 && v < byte.MaxValue) 407else if (v >= 0 && v < byte.MaxValue) 426if (value <= (byte.MaxValue >> 2)) 469if (id <= byte.MaxValue)
Microsoft.CodeAnalysis.Workspaces.UnitTests (29)
ObjectSerializationTests.cs (14)
278TestRoundTripValue(Byte.MaxValue); 282TestRoundTripValue(Byte.MaxValue); 325TestRoundTripValue<Int32>(Byte.MaxValue); 344TestRoundTripValue<Int32>(Byte.MaxValue); 365TestRoundTripValue<Int64>(Byte.MaxValue); 393TestRoundTripValue<UInt64>(Byte.MaxValue); 413writer.WriteByte(Byte.MaxValue); 417writer.WriteInt32(Byte.MaxValue); 437Assert.Equal(Byte.MaxValue, reader.ReadByte()); 441Assert.Equal(Byte.MaxValue, reader.ReadInt32()); 467writer.WriteScalarValue(Byte.MaxValue); 471writer.WriteScalarValue((Int32)Byte.MaxValue); 505Assert.Equal(Byte.MaxValue, (Byte)reader.ReadScalarValue()); 509Assert.Equal(Byte.MaxValue, (Int32)reader.ReadScalarValue());
UtilityTest\SerializableBytesTests.cs (11)
21expected.WriteByte((byte)(i % byte.MaxValue)); 42expected.WriteByte((byte)(i % byte.MaxValue)); 59Assert.Equal((byte)(index % byte.MaxValue), bytes[i]); 73expected.WriteByte((byte)(i % byte.MaxValue)); 97expected.WriteByte((byte)(i % byte.MaxValue)); 104stream.WriteByte((byte)(i % byte.MaxValue)); 116expected.WriteByte((byte)(i % byte.MaxValue)); 123stream.WriteByte((byte)(i % byte.MaxValue)); 138Assert.Equal((byte)(index % byte.MaxValue), bytes[i]); 231var valueByte = (byte)(value % byte.MaxValue); 250temp[j] = (byte)(j % byte.MaxValue);
WorkspaceServiceTests\TemporaryStorageServiceTests.cs (4)
187expected.WriteByte((byte)(i % byte.MaxValue)); 212expected.WriteByte((byte)(i % byte.MaxValue)); 229Assert.Equal((byte)(index % byte.MaxValue), bytes[i]); 251var value = (byte)(i % byte.MaxValue);
Microsoft.CSharp (1)
Microsoft\CSharp\RuntimeBinder\Semantics\ExpressionBinder.cs (1)
1543if (value <= byte.MaxValue)
Microsoft.Data.Analysis (3)
PrimitiveDataFrameColumnComputations.cs (3)
360var ret = byte.MaxValue; 577var value = byte.MaxValue; 600var value = byte.MaxValue;
Microsoft.Gen.Logging.Generated.Tests (1)
LogPropertiesTests.cs (1)
219TransitiveDerivedProp = byte.MaxValue
Microsoft.Maui.Resizetizer (4)
GenerateSplashStoryboard.cs (4)
109 float r = color.Red / (float)byte.MaxValue; 110 float g = color.Green / (float)byte.MaxValue; 111 float b = color.Blue / (float)byte.MaxValue; 112 float a = color.Alpha / (float)byte.MaxValue;
Microsoft.ML.Core (2)
Data\DataKind.cs (2)
173return byte.MaxValue; 200return byte.MaxValue;
Microsoft.ML.Data (6)
Data\Conversion.cs (6)
840public void Convert(in U2 src, ref U1 dst) => dst = src <= U1.MaxValue ? (U1)src : (U1)0; 841public void Convert(in U4 src, ref U1 dst) => dst = src <= U1.MaxValue ? (U1)src : (U1)0; 842public void Convert(in U8 src, ref U1 dst) => dst = src <= U1.MaxValue ? (U1)src : (U1)0; 843public void Convert(in UG src, ref U1 dst) => dst = src.High == 0 && src.Low <= U1.MaxValue ? (U1)src.Low : (U1)0; 988if (!TryParse(in src, out res) || res > U1.MaxValue) 1490if (res > U1.MaxValue)
Microsoft.ML.DataView (1)
KeyDataViewType.cs (1)
98return byte.MaxValue;
Microsoft.ML.FastTree (14)
Dataset\DenseIntArray.cs (1)
444Contracts.Assert(0 <= value && value <= byte.MaxValue);
Dataset\IntArray.cs (1)
311if (++runnow > byte.MaxValue)
Dataset\RepeatIntArray.cs (1)
39if (val != lastVal || delta == byte.MaxValue)
Dataset\SparseIntArray.cs (7)
59if (val != 0 || delta == byte.MaxValue) 136while (index - currentIndex > byte.MaxValue) 138tempDeltaList.Add(byte.MaxValue); 140currentIndex += byte.MaxValue; 147while (length - currentIndex > byte.MaxValue) 149tempDeltaList.Add(byte.MaxValue); 151currentIndex += byte.MaxValue;
FastTree.cs (4)
1997while (kvp.Key - last > Byte.MaxValue) 1999delta.Add(Byte.MaxValue); 2001last += Byte.MaxValue; 2003ch.Assert(kvp.Key - last <= Byte.MaxValue);
Microsoft.ML.Tests (7)
CollectionsDataViewTest.cs (2)
117fByte = byte.MaxValue - 1, 132fByte = byte.MaxValue,
Transformers\ConvertTests.cs (3)
157AE = new byte[]{ byte.MinValue, byte.MaxValue}, 225AE = new byte[]{ byte.MinValue, byte.MaxValue}, 237ConvE = new float[] { byte.MinValue, byte.MaxValue },
Transformers\HashTests.cs (2)
230if (value <= byte.MaxValue) 233HashTestCore((byte)value, new KeyDataViewType(typeof(byte), byte.MaxValue - 1), eKey, eoKey, e3Key, ecKey, 0);
Microsoft.ML.Transforms (1)
Expression\IlGeneratorExtensions.cs (1)
231if (arg <= byte.MaxValue)
Microsoft.VisualBasic.Core (5)
Microsoft\VisualBasic\CompilerServices\ObjectType.vb (3)
1744If result >= Byte.MinValue AndAlso result <= Byte.MaxValue Then 2058If result >= Byte.MinValue AndAlso result <= Byte.MaxValue Then 2360If result >= Byte.MinValue AndAlso result <= Byte.MaxValue Then
Microsoft\VisualBasic\CompilerServices\Operators.vb (2)
2818If result > Byte.MaxValue Then 3722If result > Byte.MaxValue Then
System.Data.Common (7)
System\Data\Common\ByteStorage.cs (1)
102byte min = byte.MaxValue;
System\Data\SQLTypes\SQLByte.cs (6)
198if (x.Value > byte.MaxValue || x.Value < byte.MinValue) 210if (x.Value > byte.MaxValue || x.Value < byte.MinValue) 222if (x.Value > byte.MaxValue || x.Value < byte.MinValue) 234if (x.Value > byte.MaxValue || x.Value < byte.MinValue) 246if (x.Value > byte.MaxValue || x.Value < byte.MinValue) 526public static readonly SqlByte MaxValue = new SqlByte(byte.MaxValue);
System.Drawing.Common.Tests (1)
System\Drawing\Imaging\EncoderParameterTests.cs (1)
34yield return new object[] { new Encoder(Guid.NewGuid()), byte.MaxValue };
System.Drawing.Primitives (6)
System\Drawing\Color.cs (6)
435throw new ArgumentException(SR.Format(SR.InvalidEx2BoundArgument, n, v, byte.MinValue, byte.MaxValue)); 437if (unchecked((uint)value) > byte.MaxValue) 470public static Color FromArgb(int red, int green, int blue) => FromArgb(byte.MaxValue, red, green, blue); 523return (max + min) / (byte.MaxValue * 2f); 562if (div > byte.MaxValue) 563div = byte.MaxValue * 2 - max - min;
System.Formats.Asn1 (2)
System\Formats\Asn1\Asn1Tag.cs (1)
338Debug.Assert(segment <= byte.MaxValue);
System\Formats\Asn1\AsnWriter.cs (1)
506if (length <= byte.MaxValue)
System.Formats.Cbor (3)
System\Formats\Cbor\Reader\CborReader.Integer.cs (1)
183if (result <= byte.MaxValue)
System\Formats\Cbor\Writer\CborWriter.Integer.cs (2)
92else if (value <= byte.MaxValue) 127else if (value <= byte.MaxValue)
System.Net.Primitives (1)
src\libraries\Common\src\System\Net\IPv4AddressHelper.Common.cs (1)
176if (number > byte.MaxValue)
System.Net.Quic (1)
src\libraries\Common\src\System\Net\IPv4AddressHelper.Common.cs (1)
176if (number > byte.MaxValue)
System.Net.Security (2)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Ssl.cs (1)
218if (protocol.Protocol.Length == 0 || protocol.Protocol.Length > byte.MaxValue)
src\libraries\Common\src\System\Net\IPv4AddressHelper.Common.cs (1)
176if (number > byte.MaxValue)
System.Private.CoreLib (75)
src\libraries\System.Private.CoreLib\src\System\Buffers\StandardFormat.cs (1)
18public const byte NoPrecision = byte.MaxValue;
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Parser\Utf8Parser.Integer.Unsigned.D.cs (1)
51if ((uint)answer > byte.MaxValue)
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Parser\Utf8Parser.Integer.Unsigned.N.cs (1)
55if (answer > byte.MaxValue)
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Parser\Utf8Parser.Integer.Unsigned.X.cs (1)
75if (parsedValue > byte.MaxValue / 0x10)
src\libraries\System.Private.CoreLib\src\System\Byte.cs (19)
409static byte IBinaryNumber<byte>.AllBitsSet => MaxValue; 494static byte IMinMaxValue<byte>.MaxValue => MaxValue; 770result = (actualValue >= MaxValue) ? MaxValue : (byte)actualValue; 776result = (actualValue >= MaxValue) ? MaxValue : 783result = (actualValue >= MaxValue) ? MaxValue : (byte)actualValue; 789result = (actualValue >= MaxValue) ? MaxValue : (byte)actualValue; 795result = (actualValue >= MaxValue) ? MaxValue : (byte)actualValue; 801result = (actualValue >= MaxValue) ? MaxValue : (byte)actualValue; 807result = (actualValue >= MaxValue) ? MaxValue : (byte)actualValue; 843result = (actualValue >= MaxValue) ? MaxValue : 1209static byte IBinaryIntegerParseAndFormatInfo<byte>.MaxValueDiv10 => MaxValue / 10;
src\libraries\System.Private.CoreLib\src\System\Convert.cs (7)
677if (value > byte.MaxValue) ThrowByteOverflowException(); 690if ((uint)value > byte.MaxValue) ThrowByteOverflowException(); 697if (value > byte.MaxValue) ThrowByteOverflowException(); 706if (value > byte.MaxValue) ThrowByteOverflowException(); 715if (value > byte.MaxValue) ThrowByteOverflowException(); 2064if ((uint)r > byte.MaxValue) 2087if (fromBase != 10 && r <= byte.MaxValue)
src\libraries\System.Private.CoreLib\src\System\Double.cs (2)
1394byte actualResult = (value >= byte.MaxValue) ? byte.MaxValue :
src\libraries\System.Private.CoreLib\src\System\Enum.cs (1)
113if (uint64Value > byte.MaxValue) return null;
src\libraries\System.Private.CoreLib\src\System\Guid.cs (10)
42public static Guid AllBitsSet => new Guid(uint.MaxValue, ushort.MaxValue, ushort.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue); 758if (!TryParseHex(guidString.Slice(numStart, numLen), out uint byteVal, ref overflow) || overflow || byteVal > byte.MaxValue) 766byteVal > byte.MaxValue ? ParseFailure.Overflow_Byte :
src\libraries\System.Private.CoreLib\src\System\Half.cs (2)
2096var actualResult = (value >= byte.MaxValue) ? byte.MaxValue :
src\libraries\System.Private.CoreLib\src\System\Int128.cs (2)
1800byte actualResult = (value >= byte.MaxValue) ? byte.MaxValue :
src\libraries\System.Private.CoreLib\src\System\Int16.cs (2)
1181byte actualResult = (value >= byte.MaxValue) ? byte.MaxValue :
src\libraries\System.Private.CoreLib\src\System\Int32.cs (2)
1221byte actualResult = (value >= byte.MaxValue) ? byte.MaxValue :
src\libraries\System.Private.CoreLib\src\System\Int64.cs (2)
1216byte actualResult = (value >= byte.MaxValue) ? byte.MaxValue :
src\libraries\System.Private.CoreLib\src\System\IntPtr.cs (2)
1212byte actualResult = (value >= byte.MaxValue) ? byte.MaxValue :
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NFloat.cs (2)
1659byte actualResult = (value >= byte.MaxValue) ? byte.MaxValue :
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Scalar.cs (1)
23return (T)(object)byte.MaxValue;
src\libraries\System.Private.CoreLib\src\System\SearchValues\IndexOfAnyAsciiSearcher.cs (1)
115if (typeof(T) == typeof(char) && maxInclusive >= byte.MaxValue)
src\libraries\System.Private.CoreLib\src\System\Single.cs (2)
1413var actualResult = (value >= byte.MaxValue) ? byte.MaxValue :
src\libraries\System.Private.CoreLib\src\System\Text\Latin1Encoding.cs (3)
647if (value.Value <= byte.MaxValue) 664if (value.Value <= byte.MaxValue) 746&& replacementFallback.DefaultString[0] <= byte.MaxValue)
src\libraries\System.Private.CoreLib\src\System\Text\Latin1Utility.cs (3)
140if (*pBuffer <= byte.MaxValue) 520if (*pBuffer <= byte.MaxValue) 688if (utf16Data32BitsHigh <= byte.MaxValue)
src\libraries\System.Private.CoreLib\src\System\Threading\LowLevelLifoSemaphore.cs (4)
65if (spinCount > 0 && newCounts.SpinnerCount < byte.MaxValue) 277_data = (_data & ~((ulong)byte.MaxValue << shift)) | ((ulong)value << shift); 331Debug.Assert(SpinnerCount < byte.MaxValue); 349uint availableCount = (uint)(byte.MaxValue - CountOfWaitersSignaledToWake);
src\System\Reflection\Emit\RuntimeILGenerator.cs (4)
441if ((uint)arg <= byte.MaxValue) 455if ((uint)arg <= byte.MaxValue) 469if ((uint)arg <= byte.MaxValue) 898if (tempVal > byte.MaxValue)
System.Private.DataContractSerialization (4)
System\Runtime\Serialization\Json\ByteArrayHelperWithString.cs (1)
52if (value < byte.MinValue || value > byte.MaxValue)
System\Runtime\Serialization\XmlReaderDelegator.cs (1)
575if (value < byte.MinValue || value > byte.MaxValue)
System\Xml\XmlBinaryWriter.cs (2)
647if (charCount <= byte.MaxValue / maxBytesPerChar) 666Debug.Assert(length <= byte.MaxValue);
System.Private.Uri (1)
src\libraries\Common\src\System\Net\IPv4AddressHelper.Common.cs (1)
176if (number > byte.MaxValue)
System.Private.Windows.Core.Tests (4)
System\Private\Windows\Ole\BinaryFormatUtilitiesTests.cs (2)
69new List<byte> { byte.MinValue, byte.MaxValue }, 89new byte[] { byte.MinValue, byte.MaxValue },
System\Value\StoringByte.cs (1)
11{ byte.MaxValue },
System\Value\StoringEnum.cs (1)
160MaxValue = byte.MaxValue
System.Private.Xml (3)
System\Xml\BinaryXml\XmlBinaryReader.cs (1)
3500if (value > byte.MaxValue || !XmlCharType.IsWhiteSpace((char)value))
System\Xml\Schema\DataTypeImplementation.cs (1)
3623private static readonly Numeric10FacetsChecker s_numeric10FacetsChecker = new Numeric10FacetsChecker(byte.MinValue, byte.MaxValue);
System\Xml\Schema\XmlValueConverter.cs (1)
826if (value < (int)byte.MinValue || value > (int)byte.MaxValue)
System.Reflection.Emit (3)
System\Reflection\Emit\ILGeneratorImpl.cs (3)
362if ((uint)arg <= byte.MaxValue) 376if ((uint)arg <= byte.MaxValue) 390if ((uint)arg <= byte.MaxValue)
System.Reflection.Metadata (10)
System\Reflection\Metadata\BlobReader.cs (2)
547if (value > byte.MaxValue) 570if (value > byte.MaxValue)
System\Reflection\Metadata\Ecma335\Encoding\ExceptionRegionEncoder.cs (2)
29internal const int MaxSmallExceptionRegions = (byte.MaxValue - TableHeaderSize) / SmallRegionSize; 61unchecked((uint)startOffset) <= ushort.MaxValue && unchecked((uint)length) <= byte.MaxValue;
System\Reflection\Metadata\Ecma335\Encoding\InstructionEncoder.cs (6)
225if (unchecked((uint)slotIndex) <= byte.MaxValue) 259if (unchecked((uint)slotIndex) <= byte.MaxValue) 285if (unchecked((uint)slotIndex) <= byte.MaxValue) 316if (unchecked((uint)argumentIndex) <= byte.MaxValue) 342if (unchecked((uint)argumentIndex) <= byte.MaxValue) 365if (unchecked((uint)argumentIndex) <= byte.MaxValue)
System.Runtime.Caching (1)
System\Runtime\Caching\CacheExpires.cs (1)
775Debug.Assert(NUMBUCKETS < byte.MaxValue);
System.Runtime.Numerics (7)
System\Numerics\BigInteger.cs (3)
4666actualResult = IsNegative(value) ? byte.MinValue : byte.MaxValue; 4670actualResult = (value._sign >= byte.MaxValue) ? byte.MaxValue :
System\Numerics\Complex.cs (4)
1826byte actualResult = (value.m_real >= byte.MaxValue) ? byte.MaxValue : 1962byte actualResult = (value.m_real >= byte.MaxValue) ? byte.MaxValue :
System.Security.Cryptography (2)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Rc2CbcParameters.manual.cs (2)
37Rc2Version = keySize > byte.MaxValue ? 45Rc2Version > byte.MaxValue ?
System.Security.Cryptography.Cose (2)
System\Security\Cryptography\Cose\CoseHelpers.cs (2)
52else if (value <= byte.MaxValue) 89else if (value <= byte.MaxValue)
System.Security.Cryptography.Pkcs (2)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Rc2CbcParameters.manual.cs (2)
37Rc2Version = keySize > byte.MaxValue ? 45Rc2Version > byte.MaxValue ?
System.Text.Json (1)
System\Text\Json\Reader\Utf8JsonReader.TryGet.cs (1)
308/// than <see cref="byte.MaxValue"/>.
System.Windows.Forms.Primitives (1)
System\Windows\Forms\SystemDrawingExtensions.cs (1)
41internal static bool HasTransparency(this Color color) => color.A != byte.MaxValue;
System.Windows.Forms.Primitives.Tests (14)
Interop\Oleaut32\VARIANTTests.cs (14)
192yield return new object[] { VT_UI1, (nint)byte.MaxValue, byte.MaxValue }; 193yield return new object[] { VT_UI1, (nint)ushort.MaxValue, byte.MaxValue }; 196yield return new object[] { VT_UI1, unchecked((nint)uint.MaxValue), byte.MaxValue }; 199yield return new object[] { VT_UI1, (nint)(-1), byte.MaxValue }; 222yield return new object[] { VT_UI2, (nint)byte.MaxValue, (ushort)byte.MaxValue }; 253yield return new object[] { VT_UI4, (nint)byte.MaxValue, (uint)byte.MaxValue }; 284yield return new object[] { VT_UINT, (nint)byte.MaxValue, (uint)byte.MaxValue }; 450yield return new object[] { (nint)byte.MaxValue, (ulong)byte.MaxValue }; 471yield return new object[] { byte.MaxValue };
System.Windows.Forms.Tests (11)
System\Windows\Forms\AxHost.PropertyBagStreamTests.cs (1)
98byte.MaxValue,
System\Windows\Forms\ControlTests.Properties.cs (10)
9263[InlineData(byte.MaxValue, 0, 0, 0, 0, MouseButtons.Left)] 9264[InlineData(0, byte.MaxValue, 0, 0, 0, MouseButtons.Middle)] 9265[InlineData(0, 0, byte.MaxValue, 0, 0, MouseButtons.Right)] 9266[InlineData(0, 0, 0, byte.MaxValue, 0, MouseButtons.XButton1)] 9267[InlineData(0, 0, 0, 0, byte.MaxValue, MouseButtons.XButton2)] 9268[InlineData(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, MouseButtons.Left | MouseButtons.Middle | MouseButtons.Right | MouseButtons.XButton1 | MouseButtons.XButton2)]
System.Xaml (1)
System\Xaml\Schema\TypeReflector.cs (1)
18private const XamlCollectionKind XamlCollectionKindInvalid = (XamlCollectionKind)byte.MaxValue;