Get DataSet's table with TypeDescriptor

  • Thread starter Thread starter Etienne Charland
  • Start date Start date
E

Etienne Charland

Hi, I want to get a table from a DataSet using TypeDescriptor. Why doesn't
this work? What would be the correct way of doing it?

DataSet ds = new DataSet();
ds.Tables.Add("Table1");
PropertyDescriptor Prop = TypeDescriptor.GetProperties(ds)["Table1"];
// Prop is null

Thanks!

Etienne
 
Well... "Table1" is not a property of DataSet class - its just an element in
DataSet's Tables collection.
 
Back
Top