diff --git a/src/libraries/System.Private.CoreLib/src/System/Nullable.cs b/src/libraries/System.Private.CoreLib/src/System/Nullable.cs index 5b02c367f26cb6..3d13a778978f1a 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Nullable.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Nullable.cs @@ -9,9 +9,11 @@ namespace System { // Because we have special type system support that says a boxed Nullable - // can be used where a boxed is use, Nullable can not implement any interfaces - // at all (since T may not). Do NOT add any interfaces to Nullable! + // can be used where a boxed T is used, Nullable can not implement any interfaces + // at all (since T may not). // + // Do NOT add any interfaces to Nullable! + [Serializable] [NonVersionable] // This only applies to field layout [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] @@ -96,7 +98,7 @@ public static bool Equals(Nullable n1, Nullable n2) where T : struct } // If the type provided is not a Nullable Type, return null. - // Otherwise, returns the underlying type of the Nullable type + // Otherwise, return the underlying type of the Nullable type public static Type? GetUnderlyingType(Type nullableType) { ArgumentNullException.ThrowIfNull(nullableType); @@ -118,7 +120,7 @@ public static bool Equals(Nullable n1, Nullable n2) where T : struct if (nullableType.IsGenericType && !nullableType.IsGenericTypeDefinition) { - // instantiated generic type only + // Instantiated generic type only Type genericType = nullableType.GetGenericTypeDefinition(); if (object.ReferenceEquals(genericType, typeof(Nullable<>))) {