diff options
Diffstat (limited to 'src/mscorlib/src/System/Runtime/InteropServices/GcHandle.cs')
-rw-r--r-- | src/mscorlib/src/System/Runtime/InteropServices/GcHandle.cs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/mscorlib/src/System/Runtime/InteropServices/GcHandle.cs b/src/mscorlib/src/System/Runtime/InteropServices/GcHandle.cs index 598fee0618..dcb9e24258 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/GcHandle.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/GcHandle.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. namespace System.Runtime.InteropServices -{ +{ using System; using System.Runtime.CompilerServices; using System.Threading; @@ -113,7 +113,7 @@ namespace System.Runtime.InteropServices #endif InternalFree(GetHandleValue(handle)); } - + // Target property - allows getting / updating of the handle's referent. public Object Target { @@ -122,7 +122,7 @@ namespace System.Runtime.InteropServices ValidateHandle(); return InternalGet(GetHandleValue()); } - + set { ValidateHandle(); @@ -140,7 +140,7 @@ namespace System.Runtime.InteropServices ValidateHandle(); // You can only get the address of pinned handles. - throw new InvalidOperationException(Environment.GetResourceString("InvalidOperation_HandleIsNotPinned")); + throw new InvalidOperationException(SR.InvalidOperation_HandleIsNotPinned); } // Get the address. @@ -198,7 +198,7 @@ namespace System.Runtime.InteropServices } #endif return value.m_handle; - } + } public override int GetHashCode() { @@ -208,12 +208,12 @@ namespace System.Runtime.InteropServices public override bool Equals(Object o) { GCHandle hnd; - + // Check that o is a GCHandle first - if(o == null || !(o is GCHandle)) + if (o == null || !(o is GCHandle)) return false; - else - hnd = (GCHandle) o; + else + hnd = (GCHandle)o; return m_handle == hnd.m_handle; } |