Container.ValidateName(IComponent, String) Container.ValidateName(IComponent, String) Container.ValidateName(IComponent, String) Container.ValidateName(IComponent, String) Method

Definición

Determina si el nombre del componente es único para este contenedor.Determines whether the component name is unique for this container.

protected:
 virtual void ValidateName(System::ComponentModel::IComponent ^ component, System::String ^ name);
protected virtual void ValidateName (System.ComponentModel.IComponent component, string name);
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)

Parámetros

component
IComponent IComponent IComponent IComponent

Componente con nombre.The named component.

name
String String String String

Nombre del componente que se va a validar.The component name to validate.

Excepciones

El parámetro name no es único.name is not unique.

Comentarios

El ValidateName llama al método el Add método para determinar si el nombre de la component va a agregar es único para este Container.The ValidateName method is called by the Add method to determine if the name of the component being added is unique for this Container. Si el name parámetro no es null y no es único, un ArgumentException se produce.If the name parameter is not null and is not unique, an ArgumentException is thrown.

Se aplica a

Consulte también: