CurrencyManager.GetItemProperties CurrencyManager.GetItemProperties CurrencyManager.GetItemProperties CurrencyManager.GetItemProperties Method


基になるリストのプロパティ記述子のコレクションを取得します。Gets the property descriptor collection for the underlying list.

 override System::ComponentModel::PropertyDescriptorCollection ^ GetItemProperties();
public override System.ComponentModel.PropertyDescriptorCollection GetItemProperties ();
override this.GetItemProperties : unit -> System.ComponentModel.PropertyDescriptorCollection
Public Overrides Function GetItemProperties () As PropertyDescriptorCollection


次のコード例ではGetItemProperties 、メソッドを使用PropertyDescriptorCollectionしてBindingManagerBase、のを返します。The following code example uses the GetItemProperties method to return a PropertyDescriptorCollection for a BindingManagerBase. 次に、コレクション内のNamePropertyType PropertyDescriptorのおよびを出力します。The example then prints out the Name and PropertyType of each PropertyDescriptor in the collection.

void PrintPropertyDescriptions( BindingManagerBase^ b )
   Console::WriteLine( "Printing Property Descriptions" );
   PropertyDescriptorCollection^ ps = b->GetItemProperties();
   for ( int i = 0; i < ps->Count; i++ )
      Console::WriteLine( "\t{0}\t{1}", ps[ i ]->Name, ps[ i ]->PropertyType );


private void PrintPropertyDescriptions(BindingManagerBase b)
    Console.WriteLine("Printing Property Descriptions");
    PropertyDescriptorCollection ps = b.GetItemProperties();
    for(int i = 0; i < ps.Count; i++)
        Console.WriteLine("\t" + ps[i].Name + "\t" + ps[i].PropertyType);

Private Sub PrintPropertyDescriptions(b As BindingManagerBase)
    Console.WriteLine("Printing Property Descriptions")
    Dim ps As PropertyDescriptorCollection = b.GetItemProperties()
    Dim i As Integer
    For i = 0 To ps.Count - 1
        Console.WriteLine((ControlChars.Tab & ps(i).Name & ControlChars.Tab & ps(i).PropertyType.ToString))
    Next i
End Sub


のはPropertyDescriptorCollection 、リスト内の列を指定するために使用されます。 CurrencyManagerThe PropertyDescriptorCollection for the CurrencyManager is used to specify a column in the list.