R
RickN
I have some classes set up with the same name as my database tables. I'd
like to be able to access those properties dynamically in a foreach loop wo
having to do a switch case. How do I convert the tablename so it can be
used as a class name?
for example:
DataSet ds;
foreach(DataTable dt in ds.Tables)
{
string s;
string tablename = dt.TableName;
s = mynamespace.tablename.myproperty;
DoSomething(s);
}
Thanks,
RickN
like to be able to access those properties dynamically in a foreach loop wo
having to do a switch case. How do I convert the tablename so it can be
used as a class name?
for example:
DataSet ds;
foreach(DataTable dt in ds.Tables)
{
string s;
string tablename = dt.TableName;
s = mynamespace.tablename.myproperty;
DoSomething(s);
}
Thanks,
RickN