Embedded and Linked Resources

.NET allows arbitrary resources to be bundled within the assembly. Such resources might include image or icon files, as well as text files containing error or other messages—but ultimately any file can be used as a resource. Assemblies can either directly embed these resources or provide a link to external resources.

Embedding a resource takes a copy of the named file and physically places it in the assembly file. Once the assembly has been built, the external file is no longer needed. At runtime, a request to access the file will be satisfied by the copy of the file included in the assembly.

As you have probably guessed, linking a resource simply embeds the file name of the resource as part of the assembly. This ...

Get Programming in the .NET Environment now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.