Compile resource into the final exe file : Resource ResX : Development Class C# Source Code


Custom Search

C# Source Code » Development Class » Resource ResX »

 

Compile resource into the final exe file









    


//csc /res:StringTable.resources Test.cs


//File: Test.cs
using System;
using System.Windows.Forms;
using System.Resources;
using System.Reflection;
public class Test
{
   
    public static void Main(String[] a)
    {
        ResourceManager FormResources = new ResourceManager("StringTable", Assembly.GetExecutingAssembly());
        string          Message;
        
        Message = FormResources.GetString("Message");
        MessageBox.Show(Message);
    }
}

//resgen StringTable.txt



/* File:StringTable.txt
#=============
# String Table
#=============
Message = The button has been clicked.

*/
           
       
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Development Class
» Resource ResX