Compartilhar via


Constructor.NewInstance(Object[]) Method

Definition

Uses the constructor represented by this Constructor object to create and initialize a new instance of the constructor's declaring class, with the specified initialization parameters.

[Android.Runtime.Register("newInstance", "([Ljava/lang/Object;)Ljava/lang/Object;", "")]
public Java.Lang.Object NewInstance (params Java.Lang.Object[]? initargs);
[<Android.Runtime.Register("newInstance", "([Ljava/lang/Object;)Ljava/lang/Object;", "")>]
member this.NewInstance : Java.Lang.Object[] -> Java.Lang.Object

Parameters

initargs
Object[]

array of objects to be passed as arguments to the constructor call; values of primitive types are wrapped in a wrapper object of the appropriate type (e.g. a float in a java.lang.Float Float)

Returns

a new object created by calling the constructor this object represents

Attributes

Remarks

Java documentation for java.lang.reflect.Constructor.newInstance(java.lang.Object).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to