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.

C#
public void Add(System.ComponentModel.IComponent? component);
C#
public void Add(System.ComponentModel.IComponent component);

Parameters

component
IComponent

The IComponent to add.

Remarks

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

Applies to

.NET 10 ja muud versioonid
Toode Versioonid
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

Add(IComponent, String)

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

C#
public void Add(System.ComponentModel.IComponent? component, string? name);
C#
public void Add(System.ComponentModel.IComponent component, string name);

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

.NET 10 ja muud versioonid
Toode Versioonid
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1