diff options
Diffstat (limited to 'src/System.Private.CoreLib/shared/System/UIntPtr.cs')
-rw-r--r-- | src/System.Private.CoreLib/shared/System/UIntPtr.cs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/System.Private.CoreLib/shared/System/UIntPtr.cs b/src/System.Private.CoreLib/shared/System/UIntPtr.cs index 23750e95f..c57dd86a7 100644 --- a/src/System.Private.CoreLib/shared/System/UIntPtr.cs +++ b/src/System.Private.CoreLib/shared/System/UIntPtr.cs @@ -18,9 +18,9 @@ namespace System [Serializable] [CLSCompliant(false)] [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] - public struct UIntPtr : IEquatable<UIntPtr>, ISerializable + public readonly struct UIntPtr : IEquatable<UIntPtr>, ISerializable { - unsafe private void* _value; // Do not rename (binary serialization) + private readonly unsafe void* _value; // Do not rename (binary serialization) [Intrinsic] public static readonly UIntPtr Zero; @@ -68,7 +68,7 @@ namespace System info.AddValue("value", ToUInt64()); } - public unsafe override bool Equals(Object obj) + public unsafe override bool Equals(object obj) { if (obj is UIntPtr) { @@ -77,9 +77,9 @@ namespace System return false; } - unsafe bool IEquatable<UIntPtr>.Equals(UIntPtr value) + unsafe bool IEquatable<UIntPtr>.Equals(UIntPtr other) { - return _value == value._value; + return _value == other._value; } public unsafe override int GetHashCode() @@ -208,6 +208,9 @@ namespace System [Intrinsic] [NonVersionable] +#if PROJECTN + [System.Runtime.CompilerServices.DependencyReductionRootAttribute] +#endif public unsafe void* ToPointer() { return _value; |