PropertyCollection クラス
アセンブリ: System.Data (system.data.dll 内)


PropertyCollection にアクセスするには、DataColumn、DataSet、または DataTable の各クラスの ExtendedProperties プロパティを使用します。
PropertyCollection を使用して、DataColumn オブジェクト、DataSet オブジェクト、または DataTable オブジェクトにカスタム プロパティを追加します。たとえば、後で他のオブジェクトと比較するために、オブジェクトの作成時刻を格納できます。

DataTable のタイムスタンプ値を作成し、それを PropertyCollection に追加する例を次に示します。
Private Sub AddTimeStamp() 'Create a new DataTable. Dim table As New DataTable("NewTable") 'Get its PropertyCollection. Dim properties As PropertyCollection = table.ExtendedProperties 'Add a timestamp value to the PropertyCollection. properties.Add("TimeStamp", DateTime.Now) 'Print the timestamp. Console.WriteLine(properties("TimeStamp")) End Sub
private void AddTimeStamp() { //Create a new DataTable. DataTable table = new DataTable("NewTable"); //Get its PropertyCollection. PropertyCollection properties = table.ExtendedProperties; //Add a timestamp value to the PropertyCollection. properties.Add("TimeStamp", DateTime.Now); // Print the timestamp. Console.WriteLine(properties["TimeStamp"]); }

System.Collections.Hashtable
System.Data.PropertyCollection


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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


PropertyCollection クラス
アセンブリ: System.DirectoryServices (system.directoryservices.dll 内)


- DirectoryServicesPermission LinkDemand

System.DirectoryServices.PropertyCollection


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


- PropertyCollection クラスのページへのリンク