Extended Properties

As you might have noticed, each of the DataSet, DataTable, DataColumn, and DataRelation classes exposes a PropertyCollection object through its ExtendedProperties property. The PropertyCollection class is found in the System.Data namespace and is derived from System.Collections.Hashtable. As a result, a PropertyCollection stores a set of key and value pairs that are stored based on the hash value of the key.

You typically use the extended properties collection to store metadata for the object. As an example, for a DataSet, you might store the date and time the data was retrieved from the data store, or calculate a time at which the data should be refreshed. For a DataTable, you might store the criteria that were used when ...

Get Sams Teach Yourself ADO.NET in 21 Days now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.