System.Data Namespace DataColumn Class
Returns the collection of user-defined DataColumn properties.
Script |
[ PropertyCollection variable = ] DataColumn.ExtendedProperties |
The property is read only with no default value.
The ExtendedProperties property allows you to store custom information for a DataColumn. For example, you might 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.
The following example adds a custom property to the PropertyCollection returned by the ExtendedProperties property. The second example retrieves the custom property.
private void SetProperty ( DataColumn myDataColumn ) {
myDataColumn.ExtendedProperties.Add ( "password", "yervzeñun" );
}
private void GetProperty ( DataColumn myDataColumn ) {
Response.Write ( myDataColumn.ExtendedProperties [ "password" ].ToString ( ) );
}
Private Sub SetProperty ( myDataColumn As DataColumn )
myDataColumn.ExtendedProperties.Add ( "password", "yervzeñun" )
End Sub
Private Sub GetProperty ( myDataColumn As DataColumn )
Response.Write ( myDataColumn.ExtendedProperties ( "password" ).ToString ( ) )
End Sub |
|
C# |
VB |
DataColumn Members