加载程序集中内嵌资源

Assembly asm = Assembly.Load(xmlSpaceName);
Stream sm = asm.GetManifestResourceStream(xmlSpaceName+"."+className);
System.Xml.XmlDocument xmlDoc = new System.Xml.XmlDocument();
xmlDoc.Load(sm);
System.Xml.XmlNode xmlNode1 = xmlDoc.SelectSingleNode(point);
result = xmlNode1.InnerText;

xmlSpaceName 为程序集名称

className 为xml文件名称

posted @ 2015-06-04 14:05  点点_滴滴  阅读(202)  评论(0编辑  收藏  举报