Fix Obsolete on ReadOnlySpan Equals and GetHashCode methods (#15820)
authorJan Kotas <jkotas@microsoft.com>
Thu, 11 Jan 2018 06:06:28 +0000 (22:06 -0800)
committerGitHub <noreply@github.com>
Thu, 11 Jan 2018 06:06:28 +0000 (22:06 -0800)
* Fix Obsolete on ReadOnlySpan Equals and GetHashCode methods

* Delete unnecessary CLSCompliant attribute

src/mscorlib/shared/System/ReadOnlySpan.cs
src/mscorlib/src/System/RuntimeHandles.cs

index dac8069..1854df4 100644 (file)
@@ -240,7 +240,7 @@ namespace System
         /// Always thrown by this method.
         /// </exception>
         /// </summary>
-        [Obsolete("Equals() on Span will always throw an exception. Use == instead.")]
+        [Obsolete("Equals() on ReadOnlySpan will always throw an exception. Use == instead.")]
         [EditorBrowsable(EditorBrowsableState.Never)]
         public override bool Equals(object obj)
         {
@@ -253,7 +253,7 @@ namespace System
         /// Always thrown by this method.
         /// </exception>
         /// </summary>
-        [Obsolete("GetHashCode() on Span will always throw an exception.")]
+        [Obsolete("GetHashCode() on ReadOnlySpan will always throw an exception.")]
         [EditorBrowsable(EditorBrowsableState.Never)]
         public override int GetHashCode()
         {
index 69ee4c2..dc84976 100644 (file)
@@ -244,7 +244,6 @@ namespace System
         [MethodImplAttribute(MethodImplOptions.InternalCall)]
         internal extern static RuntimeModule GetModule(RuntimeType type);
 
-        [CLSCompliant(false)]
         public ModuleHandle GetModuleHandle()
         {
             return new ModuleHandle(RuntimeTypeHandle.GetModule(m_type));