Share via


DesignSurface.CreateInstance(Type) Metode

Definisi

Membuat instans dari jenis yang diberikan.

protected public:
 virtual System::Object ^ CreateInstance(Type ^ type);
protected internal virtual object CreateInstance (Type type);
protected internal virtual object? CreateInstance (Type type);
abstract member CreateInstance : Type -> obj
override this.CreateInstance : Type -> obj
Protected Friend Overridable Function CreateInstance (type As Type) As Object

Parameter

type
Type

Jenis yang akan dibuat.

Mengembalikan

Objek yang baru dibuat.

Pengecualian

typeadalah null.

Yang IDesignerHost terpasang pada DesignSurface telah dibuang.

Keterangan

Jika type adalah IComponent, CreateInstance cari konstruktor jenis terlebih IContainer dahulu, diikuti oleh konstruktor kosong.

Berlaku untuk