diff --git a/src/System.Private.CoreLib/src/Internal/Console.cs b/src/System.Private.CoreLib/src/Internal/Console.cs index ecb751f8b378..e2d728c647f6 100644 --- a/src/System.Private.CoreLib/src/Internal/Console.cs +++ b/src/System.Private.CoreLib/src/Internal/Console.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; using System.Text; using Microsoft.Win32.SafeHandles; @@ -27,7 +28,7 @@ public static unsafe void Write(string s) } } - public static void WriteLine(string s) => + public static void WriteLine(string? s) => Write(s + Environment.NewLine); public static void WriteLine() => diff --git a/src/System.Private.CoreLib/src/System/ValueType.cs b/src/System.Private.CoreLib/src/System/ValueType.cs index 516014f34ec4..c3c2b1f45ccd 100644 --- a/src/System.Private.CoreLib/src/System/ValueType.cs +++ b/src/System.Private.CoreLib/src/System/ValueType.cs @@ -11,6 +11,7 @@ ** ===========================================================*/ +#nullable enable using System; using System.Reflection; using System.Runtime.CompilerServices; @@ -22,7 +23,7 @@ namespace System [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] public abstract class ValueType { - public override bool Equals(object obj) + public override bool Equals(object? obj) { if (null == obj) {