Add image Resource : ResXResourceWriter « GUI Windows Form « C# / C Sharp






Add image Resource


using System;
using System.Collections.Generic;
using System.Text;
using System.Resources;
using System.Drawing;

class Program
{
  static void Main(string[] args)
  {
    ResXResourceWriter rw = new ResXResourceWriter("Demo.resx");
    using (Image image = Image.FromFile("logo.gif"))
    {
      rw.AddResource("WroxLogo", image);
      rw.AddResource("Title", "C#");
      rw.AddResource("Chapter", "L");
      rw.AddResource("Author", "C");
      rw.AddResource("Publisher", "W");
      rw.Close();

    }
  }
}

           
       








Related examples in the same category

1.make a .resx file