Hi
Check this
private void button1_Click(object sender, EventArgs e)
{
OpenFileDialog dialogu = new OpenFileDialog();
dialogu.Filter = "*.txt|*.txt";
if (dialogu.ShowDialog() == DialogResult.OK)
{
string[] all = File.ReadAllLines(dialogu.FileName, System.Text.Encoding.Default);
listBox1.DataSource = all;
}
}
Best Regards
M.Mitwalli