Container.ValidateName(IComponent, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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);
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)
Parameters
- component
- IComponent
The named component.
- name
- String
The component name to validate.
Exceptions
component
is null
.
name
is not unique.
Remarks
The ValidateName method is called by the Add method to determine if the name of the component
being added is unique for this Container. If the name
parameter is not null
and is not unique, an ArgumentException is thrown.
Applies to
See also
Tee yhteistyötä kanssamme GitHubissa
Tämän sisällön lähde on GitHubissa, jossa voit myös luoda ja tarkastella ongelmia ja pull-pyyntöjä. Katso lisätietoja osallistujan oppaasta.