/ Published in: C#
Basic examples on using information stored as Resources.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
using System.Resources; using System.Drawing; using System.Reflection; namespace StudioGhibli { class ResourcesExample { static void Main(string[] args) { // the first parameter of the constructor is the fully qualified name of the resources file ResourceManager resourceManager = new ResourceManager("StudioGhibli.MoviesResources", Assembly.GetExecutingAssembly()); Bitmap image = (Bitmap) resourceManager.GetObject("TotoroLogo"); image.Save(@"H:\apps\xp\Desktop\Totoro.jpg"); } } }