What Dataset Namespace should be Included in C#

Shubham
Posted by Shubham under C# category on | Points: 40 | Views : 4238
You can create a dataset object by including the System.Data namespace as dataset class is inside this namespace only.
==================================================================================================================
using System;
using System.Data;

namespace DemoConsoleApplication
{
class DataSet_NameSpace
{
static void Main(string[] args)
{
//Create a object of dataset
DataSet oDs = new DataSet("TestDataset");
Console.WriteLine("DataSet Created.");
Console.WriteLine("DataSet Name:" + oDs.DataSetName);
Console.ReadLine();
}
}
}

Comments or Responses

Login to post response