Click here to Skip to main content
15,888,733 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to read all lines of text file in the listbox. i used common dialog to locate the file.But cant read the text in listbox.Please help me as soon as possible.....
Posted
Comments
S Houghtelin 20-Jun-11 14:15pm    
What programming language are you using? C++ C# VBA VB6 VB.NET? other?

1 solution

What is the problem? Try:
string[] lines = File.ReadAllLines(@"F:\Temp\justsometext.txt");
myListBox.Items.AddRange(lines);
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900