textreader Questions
5
Solved
Here is my code:
public static TextWriter twLog = null;
private int fileNo = 1;
private string line = null;
TextReader tr = new StreamReader("file_no.txt");
TextWriter tw = new StreamWriter("file...
Eckardt asked 18/7, 2012 at 12:22
1
Solved
I am curious why the following throws an error message (text reader closed exception) on the "last" assignment:
IEnumerable<string> textRows = File.ReadLines(sourceTextFileName);
IEnumerato...
Timekeeper asked 26/12, 2012 at 10:53
4
Solved
When I'm using a Text reader what is the best way to detect that I am actually at the end of my data? The usual way to do this is something like the following,
while(reader.Peek() != -1)
{
///...
Involucel asked 30/11, 2012 at 18:4
3
Solved
How do I loop over lines from a TextReader source?
I tried
foreach (var line in source)
But got the error
foreach statement cannot operate on variables of type 'System.IO.TextReader' because...
Incommunicado asked 2/10, 2012 at 9:8
2
Solved
How do i open a StreamReader with FILE_SHARE_READ, FILE_SHARE_WRITE, FILE_SHARE_DELETE?
Same question, slightly expanded
How do i open a StreamReader so that i can read an encoded text file, wi...
Medlin asked 18/9, 2012 at 13:57
1
Solved
The title more or less says it all. The calls are documented:
Here for TextReader.Read Method (Char[], Int32, Int32)
and
Here for TextReader.ReadBlock() with the same argument types.
I wan...
Playlet asked 8/5, 2012 at 11:19
6
Solved
I'm using A Fast CSV Reader to parse some pasted text into a webpage. The Fast CSV reader requires a TextReader object, and all I have is a string. What's the best way to convert a string into a Te...
Kingsley asked 20/10, 2011 at 14:54
1
Solved
I have 3 TextReaders -- a combination of StreamReaders and StringReaders. Conceptually, the concatenation of them is a single text document.
I want to call a method (not under my control) that tak...
Seamus asked 27/5, 2010 at 23:9
1
© 2022 - 2024 — McMap. All rights reserved.