DataTable.ExtendedProperties Proprietà

Definizione

Ottiene l'insieme di informazioni utente personalizzate.

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

Valore della proprietà

Insieme PropertyCollection che contiene informazioni utente personalizzate.

Attributi

Esempio

Nell'esempio seguente viene aggiunto un valore timestamp all'oggetto DataTable tramite la ExtendedProperties proprietà .

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

Commenti

Usare per ExtendedProperties aggiungere informazioni personalizzate a un oggetto DataTable. Aggiungere informazioni con il Add metodo . Recuperare informazioni con il Item metodo .

Le proprietà estese devono essere di tipo String. Le proprietà che non sono di tipo String non vengono mantenute quando viene DataTable scritto come XML.

Si applica a

Vedi anche