Click here to Skip to main content
12,505,591 members (51,805 online)
Click here to Skip to main content

Tagged as

Stats

0 views
Posted

read text file lines into array

, 14 Nov 2012 CPOL
One way of doing it is;string filename = "yourtextfilepath.txt";if (File.Exists(filename)){ string[] lines = File.ReadAllLines(filename); Console.WriteLine(lines["the line number that you want to print - 1"]);}If you dont want to read all the lines here is another...

Revisions


  

Compare Revision Minor Date Status Editor
2 - publicly available No 14-Nov-12 20:19 Available Orcun Iyigun
Updates in content. 2 changes had been made.
1 No 14-Nov-12 20:16 Available Orcun Iyigun

License

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

Share

About the Author

Orcun Iyigun
Software Developer Bakioglu Holding
Turkey Turkey
No Biography provided

You may also be interested in...

Pro
Pro
| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.160927.1 | Last Updated 14 Nov 2012
Article Copyright 2012 by Orcun Iyigun
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid