M
Michael Rodriguez
What is the proper way to declare and initialize an array of datasets?
Would it go like this:
private DataSet[] myDataSets;
DataSet ds1 = new DataSet(); // initialize the dataset
DataSet ds2 = new DataSet(); // initialize the dataset
myDataSets = new DataSet[2]; // does this create the array, the datasets,
or both?
myDataSets[0] = ds1;
myDataSets[1] = ds2;
// what is now the difference between these two lines?
ds1.Dispose();
myDataSets[0].Dispose();
TIA,
Mike Rodriguez
Would it go like this:
private DataSet[] myDataSets;
DataSet ds1 = new DataSet(); // initialize the dataset
DataSet ds2 = new DataSet(); // initialize the dataset
myDataSets = new DataSet[2]; // does this create the array, the datasets,
or both?
myDataSets[0] = ds1;
myDataSets[1] = ds2;
// what is now the difference between these two lines?
ds1.Dispose();
myDataSets[0].Dispose();
TIA,
Mike Rodriguez