Skip to content

Instantly share code, notes, and snippets.

@continue98
Created August 24, 2015 21:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save continue98/fc27b5fa1886957b32f6 to your computer and use it in GitHub Desktop.
Save continue98/fc27b5fa1886957b32f6 to your computer and use it in GitHub Desktop.
private async void button1_Click(object sender, EventArgs e)
{
OpenFileDialog openFile = new OpenFileDialog();
openFile.Filter = "PAWN files (*.pwn;)|*.pwn;";
string file = openFile.FileName;
if(openFile.ShowDialog() == DialogResult.OK)
{
String res;
using (StreamReader r
using (res = await r.ReadToEndAsync())
{
string[] t = r.ReadToEnd();
textBox1.Text = t;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment