TypeExtensionsGetName(Type, TypeNameKind, FuncType, AssemblyName, FuncType, String) Method

Gets the name of the type by the specified kind using custom callbacks for resolving the assembly and type names.
See the Remarks section of the GetName(Type, TypeNameKind) overload for details.

Definition

Namespace: KGySoft.CoreLibraries
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 8.2.0
C#
public static string GetName(
	this Type type,
	TypeNameKind kind,
	Func<Type, AssemblyName?>? assemblyNameResolver,
	Func<Type, string?>? typeNameResolver
)

Parameters

type  Type
The type whose name is to be obtained.
kind  TypeNameKind
The formatting kind for the name to be retrieved. Determines the fallback names if the callbacks return , and whether the assemblyNameResolver will be called.
assemblyNameResolver  FuncType, AssemblyName
If not , then will be called when the assembly identity of a type is requested.
typeNameResolver  FuncType, String
If not , then will be called for each ultimate element type and generic type definitions from which type consists of.

Return Value

String
The name of the type by the specified kind using the specified custom callbacks.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Type. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also