Top "Streamreader" questions

StreamReader is a C# class designed for character input in a particular encoding, it can be used for reading lines of information from a standard text file.

StreamReader get and set position

i simply want to read a large CSV-File and save the Stream position in a list. After that i have …

c# stream position streamreader
How to know position(linenumber) of a streamreader in a textfile?

an example (that might not be real life, but to make my point) : public void StreamInfo(StreamReader p) { string info = …

c# streamreader
check if string exists in a file

I have the following piece of code which opens a text file and reads all the lines in the file …

c# string streamreader
C# Stream.Read with timeout

I have this streamreader: Boolean read = false; while (wline!="exit") { while (!read || streamReader.Peek() >= 0) { read = true; Console.Write((char)…

c# sockets timeout streamreader
Unable to read data from the transport connection: The connection was closed error in console application

I have this code in console application and it runs in a loop try { HttpWebRequest request = (HttpWebRequest)WebRequest.Create(search); …

c# httpwebrequest console-application streamreader
Need to pick up line terminators with StreamReader.ReadLine()

I wrote a C# program to read an Excel .xls/.xlsx file and output to CSV and Unicode text. I …

c# readline streamreader newline
Is StreamReader.Readline() really the fastest method to count lines in a file?

While looking around for a while I found quite a few discussions on how to figure out the number of …

c# streamreader readline lines peek
Reading a line from a streamreader without consuming?

Is there a way to read ahead one line to test if the next line contains specific tag data? I'm …

c# readline streamreader gedcom
HTTPWebResponse + StreamReader Very Slow

I'm trying to implement a limited web crawler in C# (for a few hundred sites only) using HttpWebResponse.GetResponse() and …

c# performance web-crawler httpwebresponse streamreader
How to count lines fast?

I tried unxutils' wc -l but it crashed for 1GB files. I tried this C# code long count = 0; using (StreamReader …

c# streamreader wc