将.xsd文件嵌入资源 读取嵌入文件 并 读入到DataSet架构

using System.Data;
using System;
namespace test
{
    class Program
    {
        static void Main(string[] args)
        {
            DataSet dataSet = new DataSet();
            System.IO.Stream file = System.Reflection.Assembly.GetExecutingAssembly()
                .GetManifestResourceStream("test.schema.xsd");
            dataSet.ReadXmlSchema(file);
            Console.WriteLine(dataSet.GetXmlSchema());
            Console.Read();
        }
    }
}

你可能感兴趣的:(String,File,System,Class,dataset)