ReflectorResolveType(Assembly, TypeName, ResolveTypeOptions) Method

Gets the Type with the specified typeName from the specified assembly.

Definition

Namespace: KGySoft.Reflection
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.5.0
C#
[CLSCompliantAttribute(false)]
public static Type? ResolveType(
	Assembly assembly,
	TypeName typeName,
	ResolveTypeOptions options = ResolveTypeOptions.TryToLoadAssemblies|ResolveTypeOptions.AllowPartialAssemblyMatch
)

Parameters

assembly  Assembly
The assembly that contains the type to retrieve.
typeName  TypeName
A pre-parsed TypeName instance without an assembly name (the AssemblyName property expected to be ).
options  ResolveTypeOptions  (Optional)
The options for resolving the type. This parameter is optional.
Default value: TryToLoadAssemblies, AllowPartialAssemblyMatch.

Return Value

Type
The resolved Type, or if the ThrowError flag is not enabled in options and typeName could not be resolved with the provided options.

See Also