Aracılığıyla paylaş


DataTable.ExtendedProperties Özellik

Tanım

Özelleştirilmiş kullanıcı bilgileri koleksiyonunu alır.

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

Özellik Değeri

PropertyCollection Özel kullanıcı bilgileri içeren bir.

Öznitelikler

Örnekler

Aşağıdaki örnek özelliği aracılığıyla ExtendedProperties öğesine DataTable bir zaman damgası değeri ekler.

private void GetAndSetExtendedProperties(DataTable myTable){
   // Add an item to the collection.
   myTable.ExtendedProperties.Add("TimeStamp", DateTime.Now);
   // Print the item.
   Console.WriteLine(myTable.ExtendedProperties["TimeStamp"]);
}
Private Sub GetAndSetExtendedProperties(ByVal myTable As DataTable)
   ' Add an item to the collection.
   myTable.ExtendedProperties.Add("TimeStamp", DateTime.Now)
   ' Print the item.
   Console.WriteLine(myTable.ExtendedProperties.Item("TimeStamp"))
End Sub

Açıklamalar

bir öğesine özel bilgi eklemek için DataTableöğesini ExtendedProperties kullanın. yöntemiyle Add bilgi ekleyin. yöntemiyle Item bilgileri alın.

Genişletilmiş özellikler türünde Stringolmalıdır. Dize türünde olmayan özellikler, XML olarak yazıldığında DataTable kalıcı olmaz.

Şunlara uygulanır

Ayrıca bkz.