Importing datasets

The following is how we our datasets:

public static List<DataSet>ImportDatasets()
{
var dialog = new OpenFileDialog
{
Multiselect = false,
Title = "Open Dataset File",
Filter = "Text File|*.txt;"
};

using (dialog)
{
if (dialog.ShowDialog() != DialogResult.OK)
return null;

using (var file = File.OpenText(dialog.FileName))
{

Deserialize the data and return it:

      return JsonConvert.DeserializeObject<List<DataSet>>(file.ReadToEnd());
}
}
}
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset