IContainer.Add Metoda
Definicja
Ważne
Niektóre informacje odnoszą się do produktu w wersji wstępnej, który może zostać znacząco zmodyfikowany przed wydaniem. Firma Microsoft nie udziela żadnych gwarancji, jawnych lub domniemanych, w odniesieniu do informacji podanych w tym miejscu.
Dodaje określony składnik do elementu IContainer.
Przeciążenia
| Nazwa | Opis |
|---|---|
| Add(IComponent) |
Dodaje określony IComponent element na IContainer końcu listy. |
| Add(IComponent, String) |
Dodaje określony IComponent element na IContainer końcu listy i przypisuje nazwę do składnika. |
Add(IComponent)
- Źródło:
- IContainer.cs
- Źródło:
- IContainer.cs
Dodaje określony IComponent element na IContainer końcu listy.
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)
Parametry
- component
- IComponent
Element do dodania IComponent .
Uwagi
IComponent Nowy zostanie dodany na końcu listy.
Dotyczy
Add(IComponent, String)
- Źródło:
- IContainer.cs
- Źródło:
- IContainer.cs
Dodaje określony IComponent element na IContainer końcu listy i przypisuje nazwę do składnika.
public:
void Add(System::ComponentModel::IComponent ^ component, System::String ^ name);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of components in the container cannot be statically discovered to validate the name.")]
public void Add(System.ComponentModel.IComponent? component, string? name);
public void Add(System.ComponentModel.IComponent? component, string? name);
public void Add(System.ComponentModel.IComponent component, string name);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of components in the container cannot be statically discovered to validate the name.")>]
abstract member Add : System.ComponentModel.IComponent * string -> unit
abstract member Add : System.ComponentModel.IComponent * string -> unit
Public Sub Add (component As IComponent, name As String)
Parametry
- component
- IComponent
Element do dodania IComponent .
- name
- String
Unikatowa nazwa bez uwzględniania wielkości liter do przypisania do składnika.
— lub —
null pozostawia składnik bez nazwy.
- Atrybuty
Uwagi
IComponent Nowy zostanie dodany na końcu listy.
Notatki dotyczące implementowania
Po dziedziczeniu z Add(IComponent)programu należy upewnić się, że nameparametr , jeśli nie null, jest unikatowy dla tego elementu IContainer.