次の方法で共有


AttributeCollection コンストラクタ

AttributeCollection クラスの新しいインスタンスを初期化します。

Public Sub New( _
   ByVal attributes() As Attribute _)
[C#]
public AttributeCollection(
   Attribute[] attributes);
[C++]
public: AttributeCollection(
   Attribute* attributes[]);
[JScript]
public function AttributeCollection(
   attributes : Attribute[]);

パラメータ

  • attributes
    コレクションの属性を提供する Attribute 型の配列。

使用例

button1 の属性を使用して新しい AttributeCollection を作成する例を次に示します。この例は、フォーム上に button1 が作成されていることを前提としています。

 
Dim collection1 As AttributeCollection
collection1 = TypeDescriptor.GetAttributes(button1)

[C#] 
AttributeCollection collection1;
collection1 = TypeDescriptor.GetAttributes(button1);
}

[C++] 
AttributeCollection*    collection1;
collection1 = TypeDescriptor::GetAttributes( button1 );

[JScript] 
var collection1 : AttributeCollection;
collection1 = TypeDescriptor.GetAttributes(button1);
textBox1.Text = "The button1 has " + collection1.Count + " attributes";
}

必要条件

プラットフォーム: 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

参照

AttributeCollection クラス | AttributeCollection メンバ | System.ComponentModel 名前空間 | Attribute