Reputation: 2358
I would like to store some images to use in my C# application. They are png files and are currently in a folder with the dlls. Ideally I would like to have them included with the dll so i dont have to include the actual images with the installation.
What is the best way to do this?
I have though about resx but i am unsure as to the best way to go about it. Should I use create the resx file using another project, and then add it to the one I want to use it with?
Thanks in advance.
Upvotes: 0
Views: 360
Reputation: 28699
The easiest is to just add them to your current project and then set their Build Action property to Embedded. I believe that automatically adds them to a resource file and then you can access them using reflection.
Here's an article on retrieving them:
Upvotes: 3
Reputation: 74290
Put them in a resource file. You can add it to the same project, no need to create another one.
Upvotes: 2