Container.ValidateName(IComponent, String) メソッド

定義

コンポーネント名がこのコンテナーに対して一意かどうかを判断します。

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)

パラメーター

component
IComponent

名前付きコンポーネント。

name
String

検証するコンポーネント名。

属性

例外

componentnullです。

name は一意ではありません。

注釈

ValidateName メソッドは、追加するAddの名前がこのcomponentに対して一意であるかどうかを判断するために、Container メソッドによって呼び出されます。 name パラメーターがnullされず、一意でない場合は、ArgumentExceptionがスローされます。

適用対象

こちらもご覧ください