Marc

Marc

  • NA
  • 205
  • 54.4k

Displaying text file to Windows Application

Oct 21 2014 12:59 PM
I am trying to read a text file that is currently in my project resources and display it on my windows application pop up. This is what I got so far

private
void MyWindow_Load(object sender, EventArgs e)

{string myTxt = System.IO.File.ReadAllText("myText.txt");

Console.WriteLine(myTxt);
 

private void button1_Click(object sender, EventArgs e)

{

}private void button2_Click(object sender, EventArgs e)

{

Environment.Exit(1);

}


Answers (16)