BuildMaster SDK Reference
Version:
CreateInstance(System.Type type, bool allowNonPublicConstructor) Method
Returns a new instance of the specified type.
Syntax
public
static
object CreateInstance(System.Type type, bool allowNonPublicConstructor)
Parameters
- type
- Type: System.Type
The type to initialize an instance of.
- allowNonPublicConstructor
- Type: bool
Value indicating whether nonpublic constructors should be considered.
Returns
Instance of the specified type.
Exceptions
System.ArgumentNullException
|
type is null (Nothing in Visual Basic).
|
System.ArgumentException
|
type does not have a public parameterless constructor.
|