DesignSurface.CreateInstance(Type) Metoda

Definicja

Tworzy wystąpienie danego typu.

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

Parametry

type
Type

Typ do utworzenia.

Zwraca

Nowo utworzony obiekt.

Wyjątki

type to null.

Dołączony IDesignerHost do elementu DesignSurface został usunięty.

Uwagi

Jeśli type jest elementem IComponent, CreateInstance najpierw wyszukuje konstruktor typu IContainer , a następnie pusty konstruktor.

Dotyczy