We create new Resource file in a current project and then we add the textfile that already we fill with some data to Resource file. So that we ready to use it.
This is the sample code :
protected void Form1_Load(object sender, System.EventArgs e)
{
Assembly assem = Assembly.GetExecutingAssembly();
string value = Resource.TextFile; // TextFile is the name of resource object (textfile that we add)
}