Container.ValidateName(IComponent, String) Metódus
Definíció
Fontos
Egyes információk olyan, kiadás előtti termékekre vonatkoznak, amelyek a kiadásig még jelentősen módosulhatnak. A Microsoft nem vállal kifejezett vagy törvényi garanciát az itt megjelenő információért.
Meghatározza, hogy az összetevő neve egyedi-e ehhez a tárolóhoz.
protected:
virtual void ValidateName(System::ComponentModel::IComponent ^ component, System::String ^ name);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of components in the container cannot be statically discovered.")]
protected virtual void ValidateName(System.ComponentModel.IComponent component, string? name);
protected virtual void ValidateName(System.ComponentModel.IComponent component, string name);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of components in the container cannot be statically discovered.")>]
abstract member ValidateName : System.ComponentModel.IComponent * string -> unit
override this.ValidateName : System.ComponentModel.IComponent * string -> unit
abstract member ValidateName : System.ComponentModel.IComponent * string -> unit
override this.ValidateName : System.ComponentModel.IComponent * string -> unit
Protected Overridable Sub ValidateName (component As IComponent, name As String)
Paraméterek
- component
- IComponent
A névvel ellátott összetevő.
- name
- String
Az érvényesítendő összetevő neve.
- Attribútumok
Kivételek
component az null.
name nem egyedi.
Megjegyzések
A ValidateName metódus meghívja a Add metódust annak megállapítására, hogy a hozzáadott név component egyedi-e.Container Ha a name paraméter nem null egyedi és nem egyedi, akkor a paramétert ArgumentException a függvény eldobja.