次の方法で共有


IContainer.Add メソッド (IComponent, String)

指定した IComponentIContainer のリストの末尾に追加し、そのコンポーネントに名前を割り当てます。

Sub Add( _
   ByVal component As IComponent, _   ByVal name As String _)
[C#]
void Add(
   IComponentcomponent,stringname);
[C++]
void Add(
   IComponent* component,String* name);
[JScript]
function Add(
   component : IComponent,name : String);

パラメータ

  • component
    追加する IComponent

  • name
    コンポーネントに割り当てる、大文字小文字を区別しない一意の名前。

    または

    コンポーネントに名前を付けない場合は null 参照 (Visual Basic では Nothing) 。

解説

新しい IComponent は、リストの末尾に追加されます。

継承時の注意: Add から継承する場合は、name が null 参照 (Visual Basic では Nothing) でなければ、この IContainer で一意な名前であることを確認する必要があります。

必要条件

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ, .NET Compact Framework - Windows CE .NET

参照

IContainer インターフェイス | IContainer メンバ | System.ComponentModel 名前空間 | IContainer.Add オーバーロードの一覧