加载程序集中内嵌资源
2015-06-04 14:05
218 查看
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文件名称
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文件名称
相关文章推荐
- 如何摧毁一个程序员的效率?
- 汉字转化成拼音工具类介绍
- 指针数组和数组指针
- 限制输入的次数用到while循环
- 苹果IOS内置应用介绍
- 自定义ASP.NET Identity(二)- 修改ASP.NET Identity的用户主键
- PICT的安装及使用
- 数据集合
- WCF(二) endpoint
- C#实现json的序列化和反序列化
- SQL处理XML
- 辨别 “百度权重”作弊的手法
- call_user_func_array函数
- 数字视频概述
- 使用 ftrace 调试 Linux 内核 (二)
- 【莫比乌斯反演】[BZOJ2820]YY的GCD
- 开发中遇到的问题(2015-06-04)
- Android解析XML资源
- GIT
- 关于MySQL5.6.25在Win7 64bit下重装后无法启动的解决方法