PropertyDescriptorCollection.System.Collections.IDictionary.GetEnumerator メソッド
アセンブリ: System (system.dll 内)

Private Function System.Collections.IDictionary.GetEnumerator As IDictionaryEnumerator Implements IDictionary.GetEnumerator
Dim instance As PropertyDescriptorCollection Dim returnValue As IDictionaryEnumerator returnValue = CType(instance, IDictionary).GetEnumerator
private: virtual IDictionaryEnumerator^ System.Collections.IDictionary.GetEnumerator () sealed = IDictionary::GetEnumerator
IEnumerator 型の列挙子。

button1 のプロパティの列挙子を取得するコード例を次に示します。この例では、列挙子を使用してコレクション内のプロパティの名前を出力します。この例では、button1 と textBox1 がフォーム上でインスタンス化されていることが必要です。
Private Sub MyEnumerator() ' Creates a new collection and assigns it the properties for button1. Dim properties As PropertyDescriptorCollection = _ TypeDescriptor.GetProperties(button1) ' Creates an enumerator. Dim ie As IEnumerator = properties.GetEnumerator() ' Prints the name of each property in the collection. Dim myProperty As Object While ie.MoveNext() = True myProperty = ie.Current textBox1.Text &= myProperty.ToString() & ControlChars.Cr End While End Sub
private void MyEnumerator() { // Creates a new collection and assigns it the properties for button1. PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(button1); // Creates an enumerator. IEnumerator ie = properties.GetEnumerator(); // Prints the name of each property in the collection. Object myProperty; while(ie.MoveNext()==true) { myProperty = ie.Current; textBox1.Text += myProperty.ToString() + '\n'; } }
private: void MyEnumerator() { // Creates a new collection and assigns it the properties for button1. PropertyDescriptorCollection^ properties = TypeDescriptor::GetProperties( button1 ); // Creates an enumerator. IEnumerator^ ie = properties->GetEnumerator(); // Prints the name of each property in the collection. Object^ myProperty; while ( ie->MoveNext() == true ) { myProperty = ie->Current; textBox1->Text = textBox1->Text + myProperty + "\n"; } }
private void MyEnumerator() { // Creates a new collection and assigns it the properties for button1. PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(button1); // Creates an enumerator. IEnumerator ie = properties.GetEnumerator(); // Prints the name of each property in the collection. Object myProperty; while ((ie.MoveNext() == true)) { myProperty = ie.get_Current(); textBox1.set_Text(myProperty.ToString() + '\n'); } } //MyEnumerator

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からPropertyDescriptorCollection.System.Collections.IDictionary.GetEnumerator メソッドを検索する場合は、下記のリンクをクリックしてください。

- PropertyDescriptorCollection.System.Collections.IDictionary.GetEnumerator メソッドのページへのリンク