diff --git a/src/coreclr/tools/Common/TypeSystem/Common/TypeSystemHelpers.cs b/src/coreclr/tools/Common/TypeSystem/Common/TypeSystemHelpers.cs index 7db13bc8bc862c..931983a7245ae5 100644 --- a/src/coreclr/tools/Common/TypeSystem/Common/TypeSystemHelpers.cs +++ b/src/coreclr/tools/Common/TypeSystem/Common/TypeSystemHelpers.cs @@ -157,15 +157,6 @@ public static MethodDesc FindMethodOnTypeWithMatchingTypicalMethod(this TypeDesc return null; } - /// - /// Retrieves the namespace qualified name of a . - /// - public static ReadOnlySpan GetFullName(this DefType metadataType) - { - ReadOnlySpan ns = metadataType.Namespace; - return ns.Length > 0 ? ns.Append("."u8, metadataType.Name) : metadataType.Name; - } - /// /// Retrieves all methods on a type, including the ones injected by the type system context. /// diff --git a/src/coreclr/tools/Common/TypeSystem/Ecma/EcmaType.cs b/src/coreclr/tools/Common/TypeSystem/Ecma/EcmaType.cs index af49544682311c..2abdab970b83ac 100644 --- a/src/coreclr/tools/Common/TypeSystem/Ecma/EcmaType.cs +++ b/src/coreclr/tools/Common/TypeSystem/Ecma/EcmaType.cs @@ -419,7 +419,7 @@ public override MethodDesc GetFinalizer() if (impl == null) { // TODO: invalid input: the type doesn't derive from our System.Object - throw new TypeLoadException(System.Text.Encoding.UTF8.GetString(this.GetFullName())); + ThrowHelper.ThrowTypeLoadException(this); } if (impl.OwningType != objectType)