Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Invokes the constructor reflected by the instance that has the specified parameters, providing default values for the parameters not commonly used.
Namespace: System.Reflection
Assembly: mscorlib (in mscorlib.dll)
Syntax
'Declaration
Public Function Invoke ( _
parameters As Object() _
) As Object
public Object Invoke(
Object[] parameters
)
public:
Object^ Invoke(
array<Object^>^ parameters
)
member Invoke :
parameters:Object[] -> Object
public function Invoke(
parameters : Object[]
) : Object
Parameters
- parameters
Type: array<System. . :: . .Object> [] () [] []
An array of values that matches the number, order and type (under the constraints of the default binder) of the parameters for this constructor. If this constructor takes no parameters, then use either an array with zero elements or nullNothingnullptrunita null reference (Nothing in Visual Basic), as in Object[] parameters = new Object[0]. Any object in this array that is not explicitly initialized with a value will contain the default value for that object type. For reference-type elements, this value is nullNothingnullptrunita null reference (Nothing in Visual Basic). For value-type elements, this value is 0, 0.0, or false, depending on the specific element type.
Return Value
Type: System. . :: . .Object
An instance of the class associated with the constructor.
Remarks
The number, type, and order of elements in the parameters array should be identical to the number, type, and order of parameters for the constructor reflected by this instance. Before calling the constructor, Invoke ensures that the caller has access permission and verifies that the parameters are valid.
Access restrictions are ignored for fully trusted code. That is, private constructors, methods, fields, and properties can be accessed and invoked using reflection whenever the code is fully trusted.
This method is a convenience method for the following overloaded version, using default values. This method cannot be overridden.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.