Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/System.Private.CoreLib/shared/System/Runtime/InteropServices/SafeBuffer.cs')
-rw-r--r--src/System.Private.CoreLib/shared/System/Runtime/InteropServices/SafeBuffer.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/SafeBuffer.cs b/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/SafeBuffer.cs
index 455e41392..661a7edce 100644
--- a/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/SafeBuffer.cs
+++ b/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/SafeBuffer.cs
@@ -77,7 +77,7 @@ namespace System.Runtime.InteropServices
{
// Steal UIntPtr.MaxValue as our uninitialized value.
private static readonly UIntPtr Uninitialized = (UIntPtr.Size == 4) ?
- ((UIntPtr)UInt32.MaxValue) : ((UIntPtr)UInt64.MaxValue);
+ ((UIntPtr)uint.MaxValue) : ((UIntPtr)ulong.MaxValue);
private UIntPtr _numBytes;
@@ -94,7 +94,7 @@ namespace System.Runtime.InteropServices
[CLSCompliant(false)]
public void Initialize(ulong numBytes)
{
- if (IntPtr.Size == 4 && numBytes > UInt32.MaxValue)
+ if (IntPtr.Size == 4 && numBytes > uint.MaxValue)
throw new ArgumentOutOfRangeException(nameof(numBytes), SR.ArgumentOutOfRange_AddressSpace);
if (numBytes >= (ulong)Uninitialized)
@@ -110,7 +110,7 @@ namespace System.Runtime.InteropServices
[CLSCompliant(false)]
public void Initialize(uint numElements, uint sizeOfEachElement)
{
- if (IntPtr.Size == 4 && numElements * sizeOfEachElement > UInt32.MaxValue)
+ if (IntPtr.Size == 4 && numElements * sizeOfEachElement > uint.MaxValue)
throw new ArgumentOutOfRangeException("numBytes", SR.ArgumentOutOfRange_AddressSpace);
if (numElements * sizeOfEachElement >= (ulong)Uninitialized)
@@ -198,7 +198,7 @@ namespace System.Runtime.InteropServices
SpaceCheck(ptr, sizeofT);
// return *(T*) (_ptr + byteOffset);
- T value = default(T);
+ T value = default;
bool mustCallRelease = false;
try
{