Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Tagged as

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...



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


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


About the Author

Orcun Iyigun
Software Developer Bakioglu Holding
Turkey Turkey
No Biography provided

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