ResourceManager.CreateFileBasedResourceManager : ResourceManager « System.Resources « C# / C Sharp by API






ResourceManager.CreateFileBasedResourceManager

 
using System;
using System.Globalization;
using System.Resources;
using System.Collections;

class Class1 {
  static void Main(string[] args) {
      ResourceWriter resourceWriter = new ResourceWriter("Java2s.resources");

      resourceWriter.AddResource("key 1", "First value");
      resourceWriter.AddResource("key 2", "Second value");
      resourceWriter.AddResource("key 3", "Third value");
      resourceWriter.Generate();
      resourceWriter.Close();

      //Loose resource example
      ResourceManager rm;
      rm = ResourceManager.CreateFileBasedResourceManager("Java2s",".",null);
      Console.WriteLine(rm.GetString("key 1"));


   }
}

   
  








Related examples in the same category

1.new ResourceManager
2.ResourceManager.GetString