KGy SOFT

TypeExtensionsGetName Method (Type, TypeNameKind)

KGy SOFT Core Libraries Help
Gets the name of the type by the specified kind.
See the Remarks section for details.

Namespace:  KGySoft.CoreLibraries
Assembly:  KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 5.4.0
Syntax

public static string GetName(
	this Type type,
	TypeNameKind kind
)

Parameters

type
Type: SystemType
The type whose name is to be obtained.
kind
Type: KGySoft.CoreLibrariesTypeNameKind
The formatting kind for the name to be retrieved.

Return Value

Type: String
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).
Remarks

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

Reference