Resource Generator: Make a new *resources file : Resource File « GUI Windows Forms « C# / CSharp Tutorial






using System;
using System.Resources;
using System.Drawing;
using System.Windows.Forms;
using System.Reflection;

class MainClass
{
  static void Main(string[] args)
  {
    
    ResourceWriter rw;
    rw = new ResourceWriter("myResources.resources");

    rw.AddResource("YourImage", new Bitmap("YourFile.Bmp"));

    rw.AddResource("welcomeString", "Welcome to .NET resources.");
    rw.Generate();
  }
}








23.72.Resource File
23.72.1.Resource Generator: Make a new *resources file
23.72.2.Read resource from a .resource file