TypeExtensionsGetName(Type, TypeNameKind) Method

Gets the name of the type by the specified kind.


Namespace: KGySoft.CoreLibraries
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 8.2.0
public static string GetName(
	this Type type,
	TypeNameKind kind


type  Type
The type whose name is to be obtained.
kind  TypeNameKind
The formatting kind for the name to be retrieved.

Return Value

The name of the type by the specified kind.

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 the values of the TypeNameKind enum for the detailed differences from Type members such as Name, FullName and AssemblyQualifiedName.

Unlike the Type properties, the names produced by this method are never for runtime types.

This method always provides parseable type names by using the AssemblyQualifiedName kind. If the type contains generic arguments, then the result will be able to be parsed by the Reflector.ResolveType method.

See Also