I have an array of strings and need to convert them to a dataset. Is there some shortcut way to do this? For example:
string[] results = GetResults();
DataSet myDataSet = new DataSet();
results = myDataSet.ToDataSet(); // Convert array to data set
I’m not too bothered about formatting or structure.
I can’t see any value in this but if you really must do as you request, the following code will create a dataset with a single table that has a single column and a row per item in the array.