using System.Data; DataSet ds = new DataSet(); DataTable dt = new DataTable("Employee"); dt.Columns.Add("EmpId", typeof(int)); dt.Columns.Add("EmpName", typeof(string)); dt.Columns.Add("EmpAddress", typeof(string)); ds.Tables.Add(dt); string xmlSchema = ds.GetXmlSchema();
using System.Data; DataSet ds = new DataSet(); ds.ReadXmlSchema("Employees.xsd"); string xmlSchema = ds.GetXmlSchema();Package Library: This method is a part of the System.Data library, which is a part of the .NET Framework Class Library. This library contains classes and interfaces related to data access and management.