[To be supplied.]
[C#] In C#, this member is the indexer for the MemberAttributeCollection class.
Gets the attribute with the specified type.
[Visual Basic] Overloads Overridable Public Default ReadOnly Property Item(Type) As MemberAttribute
[C#] public MemberAttribute this[Type] {virtual get;}
[C++] public: __property virtual MemberAttribute* get_Item(Type*);
[JScript] MemberAttributeCollection.Item (Type)
Gets the attribute with the specified index
number.
[Visual Basic] Overloads Overridable Public Default ReadOnly Property Item(Integer) As MemberAttribute
[C#] public MemberAttribute this[int] {virtual get;}
[C++] public: __property virtual MemberAttribute* get_Item(int);
[JScript] MemberAttributeCollection.Item (int)
The following example uses the Item property (MemberAttributeCollection indexer) to print the name of the MemberAttribute specified by the index number in a text box. Since the index number is zero-based, this example prints the name of the second MemberAttribute in a text box. It assumes Button1 has been instantiated on a form.
Note This example shows how to use one of the overloaded versions of the Item property (MemberAttributeCollection indexer). For other examples that may be available, see the individual overload topics.
[Visual Basic]
Private Sub PrintIndexItem() 'Create a new collection and assign it the attributes for Button1. Dim attributes As MemberAttributeCollection attributes = TypeDescriptor.GetAttributes(Button1) 'Print the second attribute's name. TextBox1.Text = attributes.Item(1).ToString End Sub
MemberAttributeCollection Class | MemberAttributeCollection Members | System.ComponentModel Namespace