Gets an array with the attributes for this collection.
[Visual Basic] Overridable Public Property All As MemberAttribute () [C#] public MemberAttribute[] All {virtual get; virtual set;} [C++] public: __property virtual MemberAttribute* get_All(); public: __property virtual void set_All(MemberAttribute*[]); [JScript] public function get All() : MemberAttribute[]; public function set All(MemberAttribute[]);
An array of type MemberAttribute with the attributes for this collection.
Exception Type | Condition |
---|---|
NotSupportedException | Setting the property. |
This property is read-only. It will throw an exception if you try to set its value.
Notes to Inheritors: If you want to add to the collection, you must inherit from this class and implement set in this property.
The following example shows how to get an array of type MemberAttribute using the All property. It assumes that Button1 has been instantiated on a form.
[Visual Basic]
Private Sub GetAllAttributes() 'Create a new collection and assign it the attributes for Button1. Dim attributes As MemberAttributeCollection attributes = TypeDescriptor.GetAttributes(Button1) 'Get all the MemberAttributes. Dim aArray() As MemberAttribute aArray = attributes.All 'Print all the attributes in a text box. Dim i As Integer For i = 0 To aArray.Length - 1 TextBox1.Text &= aArray(i).ToString & " " Next End Sub
MemberAttributeCollection Class | MemberAttributeCollection Members | System.ComponentModel Namespace | MemberAttribute