C# Referencing a dataSets property without using it's name -
anyone know how reference dataset example if called dataset5 , don't want use it's name.
for example if use call display particular tables cell value
messagebox.show(dataset5.tables[0].rows[0][0].tostring());
how can same above using indexing can throw in incrementing loop similar below doesn't work. hoping maybe it's either part of array of form elements or components way can access below.
messagebox.show(datasets[24].tables[0].rows[0][0].tostring());
using sharpdevelop
if want call datasets index have have array of dataset.
dataset[] alldatasets = new dataset[5];
even better if put datasets in list. ie.
list<dataset> listdatasets = new list<dataset>(); listdatasets.add(new dataset()); listdatasets[0].tables[0].rows[0][0].tostring();
Comments
Post a Comment