Besides acting as containers for code and metadata, assemblies can also store resources for use at runtime. Visual Studio directly supports the creation of such assemblies by including files in the project and marking their build action as embedded resource. This is illustrated in Figure 25.35 for a file that was added to the project using the Add, Add Existing Item entry from the project’s context menu in Solution Explorer.
Now this stream can be accessed using the
System.Reflection APIs on the Assembly type, using the