Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

ObjectUtils.InstantiateType(Assembly, String) Method

Instantiates the type using the assembly specified to load the type.

[Visual Basic]
Public Overloads Shared Sub InstantiateType( _
   ByVal assembly As Assembly, _
   ByVal typeName As String _
)
[C#]
public static object InstantiateType(
   Assembly assembly,
   string typeName
);

Parameters

assembly
The assembly.
typeName
Name of the type.

Return Value

Remarks

This is a convenience in the case of needing to instantiate a type but not wanting to specify in the string the version, culture and public key token.

Exceptions

Exception Type Condition
ArgumentNullException If the assembly or typeName is a null reference (Nothing in Visual Basic)
FatalReflectionException If cannot load the type from the assembly or the call to
InstantiateType(Type)
fails.

See Also

ObjectUtils Class | Spring.Util Namespace | ObjectUtils.InstantiateType Overload List