This documentation is archived and is not being maintained.

DataTable.ExtendedProperties Property

Gets the collection of customized user information.

[Visual Basic]
Public ReadOnly Property ExtendedProperties As PropertyCollection
public PropertyCollection ExtendedProperties {get;}
public: __property PropertyCollection* get_ExtendedProperties();
public function get ExtendedProperties() : PropertyCollection;

Property Value

A PropertyCollection that contains custom user information.


Use the ExtendedProperties to add custom information to a DataTable. Add information with the Add method. Retrieve information with the Item method.

Extended properties must be of type String. Properties that are not of type String are not persisted when the DataTable is written as XML.


[Visual Basic, C#, C++] The following example adds a timestamp value to the DataTable through the ExtendedProperties property.

[Visual Basic] 
Private Sub GetAndSetExtendedProperties(ByVal myTable As DataTable)
   ' Add an item to the collection.
   myTable.ExtendedProperties.Add("TimeStamp", DateTime.Now)
   ' Print the item.
End Sub

private void GetAndSetExtendedProperties(DataTable myTable){
   // Add an item to the collection.
   myTable.ExtendedProperties.Add("TimeStamp", DateTime.Now);
   // Print the item.

 void GetAndSetExtendedProperties(DataTable* myTable){
    // Add an item to the collection.
    // Print the item.

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

See Also

DataTable Class | DataTable Members | System.Data Namespace