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
GitHub पर हमारे साथ सहयोग करें
इस सामग्री का स्रोत GitHub पर पाया जा सकता है, जहाँ आप समस्याएँ बना और समीक्षा भी कर सकते हैं और अनुरोध खींच सकते हैं. अधिक जानकारी के लिए, हमारे योगदानकर्ता गाइड देखें.