Container.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.
Przeciążenia
| Nazwa | Opis |
|---|---|
| Add(IComponent) |
Dodaje określony Component element do elementu Container. Składnik jest nienazwany. |
| Add(IComponent, String) |
Dodaje określony Component element do Container elementu i przypisuje mu nazwę. |
Add(IComponent)
- Źródło:
- Container.cs
- Źródło:
- Container.cs
- Źródło:
- Container.cs
- Źródło:
- Container.cs
- Źródło:
- Container.cs
public:
virtual void Add(System::ComponentModel::IComponent ^ component);
public virtual void Add(System.ComponentModel.IComponent? component);
public virtual void Add(System.ComponentModel.IComponent component);
abstract member Add : System.ComponentModel.IComponent -> unit
override this.Add : System.ComponentModel.IComponent -> unit
Public Overridable Sub Add (component As IComponent)
Parametry
- component
- IComponent
Składnik do dodania.
Implementuje
Wyjątki
Parametr component ma wartość null.
Uwagi
Ta metoda może zostać zastąpiona przez klasę pochodną.
Component Nowy zostanie dodany na końcu listy.
Zobacz też
Dotyczy
Add(IComponent, String)
- Źródło:
- Container.cs
- Źródło:
- Container.cs
- Źródło:
- Container.cs
- Źródło:
- Container.cs
- Źródło:
- Container.cs
public:
virtual 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 virtual void Add(System.ComponentModel.IComponent? component, string? name);
public virtual 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
override this.Add : System.ComponentModel.IComponent * string -> unit
abstract member Add : System.ComponentModel.IComponent * string -> unit
override this.Add : System.ComponentModel.IComponent * string -> unit
Public Overridable Sub Add (component As IComponent, name As String)
Parametry
- component
- IComponent
Składnik do dodania.
- name
- String
Unikatowa nazwa bez uwzględniania wielkości liter do przypisania do składnika.
— lub —
null, który pozostawia składnik bez nazwy.
Implementuje
- Atrybuty
Wyjątki
Parametr component ma wartość null.
name nie jest unikatowa.
Uwagi
Ta metoda może zostać zastąpiona przez klasę pochodną.
Component Nowy zostanie dodany na końcu listy.