0
如何從C#中的源代碼在同一程序集中打開xml或xsl文件? 有什麼建議嗎?在程序集中使用標記文件
如何從C#中的源代碼在同一程序集中打開xml或xsl文件? 有什麼建議嗎?在程序集中使用標記文件
谷歌發現這個
using System;
using System.IO;
using System.Reflection;
using System.Xml;
class Application
{
static void Main(string[] args)
{
Stream s =
Assembly.GetExecutingAssembly().GetManifestResourceStream("File1.xml");
XmlDocument xdoc = new XmlDocument();
using (StreamReader reader = new StreamReader(s))
xdoc.LoadXml(reader.ReadToEnd());
}
}