IContainer.Add IContainer.Add IContainer.Add IContainer.Add Method

定義

將指定的元件加入 IContainerAdds the specified component to the IContainer.

多載

Add(IComponent) Add(IComponent) Add(IComponent) Add(IComponent)

在清單結尾處,將指定的 IComponent 加入 IContainerAdds the specified IComponent to the IContainer at the end of the list.

Add(IComponent, String) Add(IComponent, String) Add(IComponent, String) Add(IComponent, String)

在清單結尾處,將指定的 IComponent 加入 IContainer,並指派名稱給元件。Adds the specified IComponent to the IContainer at the end of the list, and assigns a name to the component.

Add(IComponent) Add(IComponent) Add(IComponent) Add(IComponent)

在清單結尾處,將指定的 IComponent 加入 IContainerAdds the specified IComponent to the IContainer at the end of the list.

public:
 void Add(System::ComponentModel::IComponent ^ component);
public void Add (System.ComponentModel.IComponent component);
abstract member Add : System.ComponentModel.IComponent -> unit
Public Sub Add (component As IComponent)

參數

component
IComponent IComponent IComponent IComponent

要加入的 IComponentThe IComponent to add.

備註

IComponent的會加入至清單的結尾。The new IComponent is added at the end of the list.

Add(IComponent, String) Add(IComponent, String) Add(IComponent, String) Add(IComponent, String)

在清單結尾處,將指定的 IComponent 加入 IContainer,並指派名稱給元件。Adds the specified IComponent to the IContainer at the end of the list, and assigns a name to the component.

public:
 void Add(System::ComponentModel::IComponent ^ component, System::String ^ name);
public void Add (System.ComponentModel.IComponent component, string name);
abstract member Add : System.ComponentModel.IComponent * string -> unit
Public Sub Add (component As IComponent, name As String)

參數

component
IComponent IComponent IComponent IComponent

要加入的 IComponentThe IComponent to add.

name
String String String String

要指派給元件的唯一、不區分大小寫的名稱。The unique, case-insensitive name to assign to the component.

-或--or- null,表示沒有為元件命名。null that leaves the component unnamed.

備註

IComponent的會加入至清單的結尾。The new IComponent is added at the end of the list.

給實施者的注意事項

當您繼承自Add(IComponent)時, 您必須確定name, 如果不null是, 則對這個IContainer而言是唯一的。When you inherit from Add(IComponent), you must assure that name, if not null, is unique for this IContainer.

適用於