Container.ValidateName(IComponent, String) Yöntem

Tanım

Bileşen adının bu kapsayıcı için benzersiz olup olmadığını belirler.

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)

Parametreler

component
IComponent

Adlandırılmış bileşen.

name
String

Doğrulanması gereken bileşen adı.

Öznitelikler

Özel durumlar

component, null'e eşittir.

name benzersiz değildir.

Açıklamalar

ValidateName yöntemi, eklenen adın Add bu componentiçin benzersiz olup olmadığını belirlemek için yöntemi tarafından Container çağrılır. name Parametresi değilse null ve benzersiz değilse, bir ArgumentException oluşturulur.

Şunlara uygulanır

Ayrıca bkz.