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.
*/
Related examples in the same category