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"));
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请
点击举报。