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

type adalah null.

Yang IDesignerHost dilampirkan ke DesignSurface telah dibuang.

Keterangan

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

Berlaku untuk