Click here to Skip to main content
13,093,184 members (67,448 online)
Click here to Skip to main content

Tagged as


Posted 14 Nov 2012

read text file lines into array

, 14 Nov 2012
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 14:19 Available Orcun Iyigun
Updates in content. 2 changes had been made.
1 No 14-Nov-12 14: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

You may also be interested in...

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