How i can open an xml or xsl file inside the same a开发者_开发知识库ssembly from source code in C#? Any ideas?
Google found this
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());
}
}
精彩评论