Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

ObjectWrapper Constructor

Creates a new instance of the ObjectWrapper class, instantiating a new instance of the specified Type and using it as the WrappedInstance.

[Visual Basic]
Public Overloads Sub New( _
   ByVal type As Type _
   Type type


The Type to instantiate and wrap.


Please note that the Type passed as the type argument must have a no-argument constructor. If it does not, an exception will be thrown when this class attempts to instantiate the supplied type using it's (non-existent) constructor.


Exception Type Condition
FatalObjectException If the type is a null reference (Nothing in Visual Basic), or if the invocation of the types default (no-arg) constructor fails (due to invalid arguments, insufficient permissions, etc).

See Also

ObjectWrapper Class | Spring.Objects Namespace | ObjectWrapper Constructor Overload List