DesignSurface.CreateComponent(Type) 方法

定義

警告

CreateComponent has been replaced by CreateInstance and will be removed after Beta2

建立一個元件實例。

protected public:
 virtual System::ComponentModel::IComponent ^ CreateComponent(Type ^ componentType);
[System.Obsolete("CreateComponent has been replaced by CreateInstance and will be removed after Beta2")]
protected internal virtual System.ComponentModel.IComponent CreateComponent(Type componentType);
[<System.Obsolete("CreateComponent has been replaced by CreateInstance and will be removed after Beta2")>]
abstract member CreateComponent : Type -> System.ComponentModel.IComponent
override this.CreateComponent : Type -> System.ComponentModel.IComponent
Protected Friend Overridable Function CreateComponent (componentType As Type) As IComponent

參數

componentType
Type

要創建的元件類型。

傳回

新創造的元件。

屬性

例外狀況

componentTypenull

備註

CreateComponent此方法是設計表面CreateComponent的方法來建立元件實例。 元件應建立並加入設計表面的公共容器。

適用於