Created
July 6, 2010 11:57
-
-
Save anonymous/465288 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Data; | |
using System.Drawing; | |
using System.Linq; | |
using System.Text; | |
using System.Windows.Forms; | |
namespace WindowsFormsApplication2 | |
{ | |
public partial class Form1 : Form | |
{ | |
public Form1() | |
{ | |
InitializeComponent(); | |
} | |
private void textBox2_TextChanged(object sender, EventArgs e) | |
{ | |
} | |
private void button1_Click(object sender, EventArgs e) | |
{ | |
OpenFileDialog dlg = new OpenFileDialog(); | |
dlg.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*"; | |
if (dlg.ShowDialog() == DialogResult.OK) | |
{ | |
textBox1.Text=dlg.FileName; | |
} | |
Textreader tr = new StreamReader(dlg.FileName); | |
while ((string line = tr.ReadLine()) != null) { textBox2 += line; textBox2 += "/n"; } | |
tr.Close(); | |
} | |
private void textBox1_TextChanged(object sender, EventArgs e) | |
{ | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment