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);
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

Parametr type ma wartość null.

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

Uwagi

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

Dotyczy