ExtendedProperties Property

DataColumn.ExtendedProperties Property

Gets the collection of custom user information associated with a DataColumn.

[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 of custom information.


The ExtendedProperties property allows you to store custom information with the object. For example, you may store a time when the data should be refreshed.

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


[Visual Basic, C#, C++] The following example adds a custom property to the PropertyCollection returned by the ExtendedProperties property. The second example retrieves the custom property.

[Visual Basic] 
Private Sub SetProperty(myColumn As DataColumn)
    myColumn.ExtendedProperties.Add("TimeStamp", DateTime.Now)
End Sub    
Private Sub GetProperty(myColumn As DataColumn)
End Sub

private void SetProperty(DataColumn myColumn){
   myColumn.ExtendedProperties.Add("TimeStamp", DateTime.Now);

private void GetProperty(DataColumn myColumn){

 void SetProperty(DataColumn* myColumn){
 void GetProperty(DataColumn* myColumn){

[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

DataColumn Class | DataColumn Members | System.Data Namespace | PropertyCollection

© 2016 Microsoft