打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
C#如何创建和访问资源DLL
Create a "Class Library" project. Remove everything except the
AssemblyInfo.cs file from the project.
Add your XML and XSD files to the project and set their Build Action to
Embedded Resource
Then compile the project and you should have the resource library.

To retrieve the stored resources, you will need to load the assembly with
Assembly.Load or Assembly.LoadFrom and use the Assembly class'
GetManifestResourceStream method.
 
                _assembly = Assembly.GetExecutingAssembly();
                _imageStream = _assembly.GetManifestResourceStream("WindowsFormsApplication8.MyImage.bmp");
                _textStreamReader = new StreamReader(_assembly.GetManifestResourceStream("WindowsFormsApplication8.MyTextFile.txt"));
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
C#中使用嵌入的资源
在.NET中读取嵌入和使用资源文件的方法
C#之程序集
WPF下遍历作为Resource嵌入在可执行程序中的图片的一点思考
C# 嵌入式资源
Creating a Basic Web Part
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服