From 8f2e3ddda2241c6816bf607605bc9e61873a0471 Mon Sep 17 00:00:00 2001 From: skyoxZ Date: Sat, 27 May 2023 00:24:07 +0800 Subject: [PATCH] Remove inconsistent comments in Convert.cs (#86425) * Remove inconsistent comments * Fix inconsistent comments * Fix inconsistent comments --- .../System.Private.CoreLib/src/System/Convert.cs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/libraries/System.Private.CoreLib/src/System/Convert.cs b/src/libraries/System.Private.CoreLib/src/System/Convert.cs index c351d4dbf30..fb1839a49ff 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Convert.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Convert.cs @@ -113,17 +113,12 @@ namespace System } // Converts the given object to the given type. In general, this method is - // equivalent to calling the Value.ToXXX(value) method for the given + // equivalent to calling ((IConvertible)value).ToXXX(CultureInfo.CurrentCulture) for the given // typeCode and boxing the result. // // The method first checks if the given object implements IConvertible. If not, - // the only permitted conversion is from a null to TypeCode.Empty, the + // the only permitted conversion is from a null to TypeCode.Empty/TypeCode.String/TypeCode.Object, the // result of which is null. - // - // If the object does implement IConvertible, a check is made to see if the - // object already has the given type code, in which case the object is - // simply returned. Otherwise, the appropriate ToXXX() is invoked on the - // object's implementation of IConvertible. [return: NotNullIfNotNull(nameof(value))] public static object? ChangeType(object? value, TypeCode typeCode) { -- 2.34.1