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.

Will closing a FileStream close the StreamReader?

If I use a FileStream to create a StreamReader, will the StreamReader close when I close the FileStream or will …

c# .net-3.5 filestream streamreader
C# Error reading JObject from JsonReader. Path '', line 0, position 0

I'm trying to parse my json with the code below. I get the error: Error reading JObject from JsonReader. Path …

c# json stream streamreader jsonreader
How can I detect if a .NET StreamReader found a UTF8 BOM on the underlying stream?

I get a FileStream(filename,FileMode.Open,FileAccess.Read,FileShare.ReadWrite) and then a StreamReader(stream,true). Is there a …

c# utf-8 filestream streamreader byte-order-mark
How to read huge CSV file with 29 million rows of data using .net

I have a huge .csv file, to be specific a .TAB file with 29 million rows and the file size is …

c# .net csv streamreader
type or namespace name "StreamReader" could not be found

I am working on StreamReader in C#. I am getting the error "The type or namespace name "StreamReader" could not …

c# .net streamreader
What is the purpose of StreamReader when Stream.Read() exists?

This has been bugging me. I know Stream is an abstract class and therefore can't be instantiated but it has …

c# io stream streamreader streamwriter
StreamReader and binary data

I have this text file what contains different fields. Some fields may contain binary data. I need to get all …

c# .net binary-data streamreader
Extracting the first 10 lines of a file to a string

public void get10FirstLines() { StreamReader sr = new StreamReader(path); String lines = ""; lines = sr.readLine(); } How can I get the first 10 …

c# streamreader
What is the encoding of the string get from StreamReader.ReadLine()

First, let's see the code: //The encoding of utf8.txt is UTF-8 StreamReader reader = new StreamReader(@"C:\\utf8.txt", Encoding.…

c# unicode streamreader
"stream was not readable" ArgumentException when using ReadAsStreamAsync with StreamReader

I have the following piece of code to read and process the response of a Http get request using StreamReader: …

c# stream async-await task-parallel-library streamreader