Which is the base class for TypedDataset
-
DataReader
-
Dataset
-
DataAdapter
To answer this question, the user should be familiar with the concept of typed datasets and their relationship to other classes in the .NET framework.
The correct answer is:
B. Dataset
Explanation:
In the .NET framework, the base class for typed datasets is the Dataset class. A typed dataset is a dataset that is derived from the Dataset class and includes additional features such as strongly-typed data tables and data columns.
A. DataReader is not the base class for TypedDataset. The DataReader class is used for reading data from a database and does not have a direct relationship to typed datasets.
C. DataAdapter is also not the base class for TypedDataset. The DataAdapter class is used for retrieving and updating data from a database, but it is not the base class for typed datasets.
Therefore, the correct answer is B. Dataset.
In ADO.NET, a strongly-typed DataSet (TypedDataset) is code-generated but still derives from the base System.Data.DataSet class — it just layers typed properties and methods over the same underlying object model. DataReader is a separate, connected/forward-only data access object with no inheritance relationship to DataSet. DataAdapter is the bridge that fills and updates a DataSet from a data source; it is not a superclass of DataSet.