Rediger

Del via


IContainer.Add Method

Definition

Adds the specified component to the IContainer.

Overloads

Add(IComponent)

Adds the specified IComponent to the IContainer at the end of the list.

Add(IComponent, String)

Adds the specified IComponent to the IContainer at the end of the list, and assigns a name to the component.

Add(IComponent)

Adds 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);
public void Add (System.ComponentModel.IComponent component);
abstract member Add : System.ComponentModel.IComponent -> unit
Public Sub Add (component As IComponent)

Parameters

component
IComponent

The IComponent to add.

Remarks

The new IComponent is added at the end of the list.

Applies to

Add(IComponent, String)

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

Parameters

component
IComponent

The IComponent to add.

name
String

The unique, case-insensitive name to assign to the component.

-or-

null that leaves the component unnamed.

Remarks

The new IComponent is added at the end of the list.

Notes to Implementers

When you inherit from Add(IComponent), you must assure that name, if not null, is unique for this IContainer.

Applies to