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
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om