asp.net.ph

PropertyCollection Class

System.Data Namespace


Represents a collection of properties that can be added to DataColumn, DataSet, or DataTable.

PropertyCollection Class Members

Collapse   Constructors

Visibility Constructor Parameters
public PropertyCollection ( )

Collapse   Methods

Visibility Name Parameters Return Type
public Clone ( ) Object

Remarks

The PropertyCollection can be accessed through the ExtendedProperties property of the DataColumn, DataSet, or DataTable class.

Add custom properties to the DataColumn, DataSet, or DataTable objects through the PropertyCollection. For example, you may want to store the time of the object' s creation for later comparison to another object.

Example

The following example initializes a custom password for a DataTable and adds it to the PropertyCollection.

private void AddPassWord ( ) {
   PropertyCollection p;

   // create a new DataTable.
   DataTable dt = new DataTable ( "myNewTable" );

   // get its PropertyCollection.
   p = dt.ExtendedProperties;

   // add a password to the PropertyCollection.
   p.Add ( "myPassword", "yervzeñun" );

   // print the password.
   Response.Write ( dt.ExtendedProperties [ "myPassword" ] );
}
  C# VB

See Also

DataColumn   DataSet   DataTable   DataColumn.ExtendedProperties   DataSet.ExtendedProperties   DataTable.ExtendedProperties Skip Navigation Links




Previous page Back to top Next page

Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note