NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

PropertyDescriptorCollection.Item

[To be supplied.]

[C#] In C#, this member is the indexer for the PropertyDescriptorCollection class.

Overload List

Gets the property with the specified name.

[Visual Basic] Overloads Overridable Public Default ReadOnly Property Item(String) As PropertyDescriptor
[C#] public PropertyDescriptor this[String] {virtual get;}
[C++] public: __property virtual PropertyDescriptor* get_Item(String*);
[JScript] PropertyDescriptorCollection.Item (String)

Gets the property with the specified index number.

[Visual Basic] Overloads Overridable Public Default ReadOnly Property Item(Integer) As PropertyDescriptor
[C#] public PropertyDescriptor this[int] {virtual get;}
[C++] public: __property virtual PropertyDescriptor* get_Item(int);
[JScript] PropertyDescriptorCollection.Item (int)

Example [Visual Basic]

The following example uses the Item property (PropertyDescriptorCollection indexer) to print the name of the PropertyDescriptor specified by the index number in a text box. Since the index number is zero-based, this example prints the name of the second PropertyDescriptor. 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 (PropertyDescriptorCollection indexer). For other examples that may be available, see the individual overload topics.

[Visual Basic]

Private Sub PrintIndexItem()
   Dim properties As PropertyDescriptorCollection
   properties = TypeDescriptor.GetProperties(Button1)

   ' Print the second property's name.
   TextBox1.Text = properties.Item(1).Name
End Sub

See Also

PropertyDescriptorCollection Class | PropertyDescriptorCollection Members | System.ComponentModel Namespace