Open sandboxFocus

Method BindToType

BindToType(string, string)

Gets a Type given a type name and an assembly name.

Declaration
public virtual Type BindToType(string typeName, string assemblyName)
Parameters
Type Name Description
string typeName

The type name.

string assemblyName

The assembly name.

Returns
Type Description
Type

The required Type.

Remarks

The default implementation resolves the name with GetType(string). It throws a NotSupportedException in an application that is trimmed or compiled ahead of time, because the trimmer can remove the type. Override this method to resolve the names in such an application.