PropertyDescriptor.CreateInstance(Type) Method

Definition

Creates an instance of the specified type.

protected:
 System::Object ^ CreateInstance(Type ^ type);
protected object CreateInstance (Type type);
member this.CreateInstance : Type -> obj

Parameters

type
Type

A Type that represents the type to create.

Returns

A new instance of the type.

Remarks

CreateInstance looks for a constructor that takes the specified type. If it finds a constructor, the type of the property is passed in.

Converters and editors use this method to create versions of a component. This method enables a single component to be reused for more than one type.

Security

ReflectionPermission
for access to private class members and metadata. Associated enumeration: Unrestricted

Applies to

See also