DataTable.ExtendedProperties Propriété

Définition

Obtient la collection d'informations utilisateur personnalisées.

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

Valeur de propriété

PropertyCollection qui contient les informations utilisateur personnalisées.

Attributs

Exemples

L’exemple suivant ajoute une valeur d’horodatage à la DataTable propriété through ExtendedProperties .

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

Remarques

Utilisez pour ExtendedProperties ajouter des informations personnalisées à un DataTable. Ajoutez des informations avec la Add méthode . Récupérez des informations avec la Item méthode .

Les propriétés étendues doivent être de type String. Les propriétés qui ne sont pas de type String ne sont pas conservées lorsque le DataTable est écrit au format XML.

S’applique à

Voir aussi