Question 1Medium
Is the following true about a DataSet?
I Data TableCollectio object containing null or multiple Data Table objects(Columns, Rows, Constraints).
II. DataRelationCollection Object containing null or multiple DataRelation objects which establish a parent/child relation between two DataTable objects.
- I
- II
- I and II
- None of the above
Answer: C. I and II
Explanation
Both statements are true. A DataSet holds a DataTableCollection of its tables and a DataRelationCollection of relations between a parent and a child table, so the answer is I and II.
Step-by-step solution
- Statement I: the Tables property is a DataTableCollection holding DataTable objects.
- Statement II: the Relations property is a DataRelationCollection of DataRelation objects linking parent and child tables.
- Both statements are true, so the correct answer I and II is correct.
Why the other options are wrong
- A. Statement II is also true, so I alone is incomplete.
- B. Statement I is also true, so II alone is incomplete.
- D. Both statements are true, so None of the above is wrong.
Tip: Check each statement on its own; if both hold, pick the both-true option.