KGy SOFT

TypeNameKind Enumeration

KGy SOFT Core Libraries Help
Represents name formatting options for the TypeExtensions.GetName methods.

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

public enum TypeNameKind
Members

  Member nameValueDescription
ShortName0

Represents the short name of a Type without namespaces, eg.:
SomeType[String,SomeType]

Differences from Type.Name:

  • Type.Name does not dump the generic type arguments for constructed generic types.

LongName1

Represents the long name of a Type along with namespaces, eg.:
SomeNamespace.SomeType[System.String,SomeNamespace.SomeType]

If this name is unique in the loaded assemblies, then the name can be successfully parsed by the Reflector.ResolveType method.

Differences from Type.ToString:

FullName2

Represents the full name of a Type with assembly qualified names for generic arguments of non-core types, eg.:
SomeNamespace.SomeType[System.String,[SomeNamespace.SomeType, SomeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]

If this name is unique in the loaded assemblies, then the name can be successfully parsed by the Reflector.ResolveType method.

Differences from Type.FullName:

  • Type.FullName dumps the assembly names for every generic type argument.
  • Type.FullName returns for generic parameter types.
  • Type.FullName does not dump the generic arguments for constructed open generic types.

ForcedFullName3

Represents the full name of a Type with assembly qualified names for all generic arguments, eg.:
SomeNamespace.SomeType[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[SomeNamespace.SomeType, SomeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]

If this name is unique in the loaded assemblies, then the name can be successfully parsed by the Reflector.ResolveType method.

Differences from Type.FullName:

  • Type.FullName returns for generic parameter types.
  • Type.FullName does not dump the generic arguments for constructed open generic types.

AssemblyQualifiedName4

Represents the assembly qualified name of a Type omitting assembly names for core types, eg.:
SomeNamespace.SomeType[System.String,[SomeNamespace.SomeType, SomeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], SomeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null

If all needed assemblies are available, then the name can be successfully parsed by the Reflector.ResolveType method.

If the type does not contain generic parameter types, then the name can be parsed even by the Type.GetType method.

Differences from Type.AssemblyQualifiedName:

ForcedAssemblyQualifiedName5

Represents the assembly qualified name of a Type forcing assembly names for core types, eg.:
SomeNamespace.SomeType[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[SomeNamespace.SomeType, SomeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], SomeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null

If all needed assemblies are available, then the name can be successfully parsed by the Reflector.ResolveType method.

If the type does not contain generic parameter types, then the name can be parsed even by the Type.GetType method.

Differences from Type.AssemblyQualifiedName:

See Also

Reference