I have a windows forms applicaton that stores several small icons as resources for the application. I have been using the select resource screen within Visual Studio which gives you the option of using a Local Resource or a Project resource. Obviously the project resource method provides a way to use the same image multiple times which seems to be the best choice for storing these images.
When using the Project resource the generated code is:
global::<project name>.Properties.Resources.<name of resouce>
If I choose the Local Resource the generated code is:
((System.Drawing.Image)(resources.GetObject("<name of image>")))
I have had issues with the first method under load in a terminal server environment, so I've started to transition to the second method. But it looks very similar and prompted the question:
What is the best way to manage these resources? Does everyone use the code generated by Visual Studio? Do you have your own method of accessing these resources?