DataSet.ExtendedProperties プロパティ
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
DataSet
に関連付けられている、カスタマイズされたユーザー情報のコレクションを取得します。
public:
property System::Data::PropertyCollection ^ ExtendedProperties { System::Data::PropertyCollection ^ get(); };
[System.ComponentModel.Browsable(false)]
public System.Data.PropertyCollection ExtendedProperties { get; }
[System.ComponentModel.Browsable(false)]
[System.Data.DataSysDescription("ExtendedPropertiesDescr")]
public System.Data.PropertyCollection ExtendedProperties { get; }
[<System.ComponentModel.Browsable(false)>]
member this.ExtendedProperties : System.Data.PropertyCollection
[<System.ComponentModel.Browsable(false)>]
[<System.Data.DataSysDescription("ExtendedPropertiesDescr")>]
member this.ExtendedProperties : System.Data.PropertyCollection
Public ReadOnly Property ExtendedProperties As PropertyCollection
すべてのカスタム ユーザー情報が含まれる PropertyCollection。
- 属性
次の例では、 プロパティによって返される に PropertyCollection カスタム プロパティを ExtendedProperties 追加します。 2 番目の例では、カスタム プロパティを取得します。
private void SetProperty(DataColumn column)
{
column.ExtendedProperties.Add("TimeStamp", DateTime.Now);
}
private void GetProperty(DataColumn column)
{
Console.WriteLine(column.ExtendedProperties["TimeStamp"].ToString());
}
Private Sub SetProperty(column As DataColumn)
column.ExtendedProperties.Add("TimeStamp", DateTime.Now)
End Sub
Private Sub GetProperty(column As DataColumn)
Console.WriteLine(column.ExtendedProperties("TimeStamp").ToString())
End Sub
ExtendedPropertiesプロパティを使用すると、 を使用してカスタム情報をDataSet
格納できます。 たとえば、データを更新する必要がある時刻を格納できます。
拡張プロパティは、 が XML として書き込まれるときにDataSet永続化する場合は、型Stringである必要があります。
.NET に関するフィードバック
.NET はオープンソース プロジェクトです。 フィードバックを提供するにはリンクを選択します。