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