16
Reply

Displaying text file to Windows Application

Ask a question
Marc

Marc

9y
981
1
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)
Next Recommended Forum