"Roger" <ro********@btinternet.comwrote in message
news:D1**********************************@microsof t.com...
hi all
I have this line of code KomfireTableAdapter Komfire = new
KomfireTableAdapter
estimator.KomfireDataTable..... I want the parts in brackets to be a
variable (Komfire)TableAdapter Komfire = new (Komfire)TableAdapter
estimator.(Komfire)DataTable table = (Komfire).getdata...............
So Komfire need to be variable can that be done?
this is not all clear, but:
it appears from line 2 that "Komfire" is the identifier for an instance of
the class KomfireTableAdapter; you can of course give the instance whatever
name you wish .... so in that sense, yes, it can be "variable"
as for the rest of it, I'm not sure what you're doing; Komfire is a member
of estimator??
I *think* what you're looking for is perhaps simpler:
DataTable tbl;
KomfireTableAdapter Komfire = new KomfireTableAdapter();
tbl = Komfire.getdata();
maybe ...........