Click here to Skip to main content
15,886,199 members
Home / Discussions / C#
   

C#

 
AnswerRe: How can i retry read current line at text file? Pin
koolprasad200329-May-16 19:30
professionalkoolprasad200329-May-16 19:30 
GeneralRe: How can i retry read current line at text file? Pin
OriginalGriff29-May-16 20:03
mveOriginalGriff29-May-16 20:03 
GeneralRe: How can i retry read current line at text file? Pin
koolprasad200329-May-16 20:08
professionalkoolprasad200329-May-16 20:08 
GeneralRe: How can i retry read current line at text file? Pin
Member 1243103929-May-16 20:28
Member 1243103929-May-16 20:28 
GeneralRe: How can i retry read current line at text file? Pin
koolprasad200329-May-16 22:56
professionalkoolprasad200329-May-16 22:56 
GeneralRe: How can i retry read current line at text file? Pin
Eddy Vluggen30-May-16 0:25
professionalEddy Vluggen30-May-16 0:25 
GeneralRe: How can i retry read current line at text file? Pin
OriginalGriff29-May-16 20:54
mveOriginalGriff29-May-16 20:54 
SuggestionRe: How can i retry read current line at text file? Pin
Richard Deeming1-Jun-16 1:59
mveRichard Deeming1-Jun-16 1:59 
I think you're confusing File.ReadLines[^] and File.ReadAllLines[^]. Smile | :)

ReadAllLines reads all lines into memory and returns them as an array.
ReadLines returns an iterator that yields each line as it's read.

File.ReadLines is essentially the same as:
C#
using (StreamReader reader = new StreamReader(path))
{
    string line;
    while ((line = reader.ReadLine()) != null)
    {
        yield return line;
    }
}




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


QuestionGeometry problem with c# .net Pin
avisotorisher29-May-16 0:35
avisotorisher29-May-16 0:35 
AnswerRe: Geometry problem with c# .net Pin
Richard MacCutchan29-May-16 1:08
mveRichard MacCutchan29-May-16 1:08 
GeneralRe: Geometry problem with c# .net Pin
avisotorisher29-May-16 2:05
avisotorisher29-May-16 2:05 
GeneralRe: Geometry problem with c# .net Pin
Richard MacCutchan29-May-16 2:12
mveRichard MacCutchan29-May-16 2:12 
GeneralRe: Geometry problem with c# .net Pin
avisotorisher30-May-16 18:35
avisotorisher30-May-16 18:35 
AnswerRe: Geometry problem with c# .net Pin
Patrice T29-May-16 7:13
mvePatrice T29-May-16 7:13 
GeneralRe: Geometry problem with c# .net Pin
Sascha Lefèvre29-May-16 9:30
professionalSascha Lefèvre29-May-16 9:30 
GeneralRe: Geometry problem with c# .net Pin
Patrice T29-May-16 13:36
mvePatrice T29-May-16 13:36 
AnswerRe: Geometry problem with c# .net Pin
avisotorisher30-May-16 17:29
avisotorisher30-May-16 17:29 
QuestionLooking the best GPS tracking Application until now Pin
Dr Kasa29-May-16 0:12
Dr Kasa29-May-16 0:12 
AnswerRe: Looking the best GPS tracking Application until now Pin
Eddy Vluggen29-May-16 0:20
professionalEddy Vluggen29-May-16 0:20 
GeneralRe: Looking the best GPS tracking Application until now Pin
Dr Kasa20-Apr-17 3:34
Dr Kasa20-Apr-17 3:34 
AnswerRe: Looking the best GPS tracking Application until now Pin
PraveenDora31-May-16 6:41
PraveenDora31-May-16 6:41 
GeneralRe: Looking the best GPS tracking Application until now Pin
Dr Kasa20-Apr-17 3:33
Dr Kasa20-Apr-17 3:33 
QuestionSystem.Windows.Forms Issue Pin
jkadjthegamegadhguaet27-May-16 15:44
jkadjthegamegadhguaet27-May-16 15:44 
AnswerRe: System.Windows.Forms Issue Pin
OriginalGriff27-May-16 20:52
mveOriginalGriff27-May-16 20:52 
AnswerRe: System.Windows.Forms Issue Pin
BillWoodruff28-May-16 2:44
professionalBillWoodruff28-May-16 2:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.