ReflectorResolveType(String, Boolean, Boolean) Method

Note: This API is now obsolete.
Gets the Type with the specified typeName. When no assembly is defined in typeName, the type can be defined in any loaded assembly.

Definition

Namespace: KGySoft.Reflection
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 9.0.0
C#
[ObsoleteAttribute("This overload is obsolete. Use the overloads with ResolveTypeOptions instead.")]
public static Type? ResolveType(
	string typeName,
	bool tryLoadAssemblies,
	bool allowPartialAssemblyMatch = true
)

Parameters

typeName  String
The type name as a string representation with or without assembly name.
tryLoadAssemblies  Boolean
to try loading assemblies present in typeName if they are not loaded already; to locate assemblies among the loaded ones only.
allowPartialAssemblyMatch  Boolean  (Optional)
to allow resolving assembly names by simple assembly name, and ignoring version, culture and public key token information even if they present in typeName; to consider every provided information in assembly names. This parameter is optional.
Default value: .

Return Value

Type
The resolved Type, or if typeName cannot be resolved.

Remarks

typeName can be generic and may contain fully or partially defined assembly names.

typeName can contain generic parameter types in the format as they are returned by the TypeExtensions.GetName extension method.

  Note

If tryLoadAssemblies is and allowPartialAssemblyMatch is , then it can happen that the assembly of a different version will be loaded and the method returns .

See Also