Questions tagged [textreader]

68 questions
0
votes
1 answer

How does one read from stdin when no characters remain?

I am writing a basic Scanner class similar to Java's. Here is what I have (well, the relevant parts): using System.Text; using System.Collections.Generic; namespace System.IO { /// /// /// Scanner is a…
Tyler Crompton
  • 12,284
  • 14
  • 65
  • 94
0
votes
4 answers

How to loop over each line from a TextReader?

Possible Duplicate: C# Reading a File Line By Line How to loop over lines from a TextReader? I am given a .NET TextReader (a class that can read a sequential series of characters). How can I loop over its content by line?
Colonel Panic
  • 132,665
  • 89
  • 401
  • 465
0
votes
4 answers

How to check if an item isn't in a control using a foreach?

I am currently trying to use a foreach loop to check if a listviewitem is NOT in the listview and if it is to not write it again. This is my code so far. private void button1_Click(object sender, EventArgs e) { TextReader reader =…
Ian Lundberg
  • 1,813
  • 10
  • 31
  • 48
-1
votes
1 answer

List values are not being stored

Can someone please tell me what I'm missing, the class reads values from a text file and should store them for other use, I can see the values with Console.Write(eachCell[0]) but I can't save the values. I've tried using string[] and List
-1
votes
2 answers

C# TextWriter adds new line for no reason

Hello fellow StackOverflow users. The Problem I have a simple C# code, where I have method that takes both an TextReader (reader) and an TextWriter (writer) as arguments. Everytime I run writer.Write("\n") it jumpts 2 lines and writer.Write(" ") it…
-1
votes
1 answer

C# file path using TextReader defaults to Documents and Settings

I have a program that has been running as a scheduled task for quite some time. I made one change to it, not even related to the TextReader and placed a copy of the .exe back on the server (Server 2003 R2 SP2) and now when you run the program from…
John Wesley Gordon
  • 910
  • 2
  • 17
  • 39
-1
votes
2 answers

TextReader() crashed by Timer_Tick() + this.ActiveControl?

I have child form that has a TextReader to load some values on being called. It keeps crashing the moment I summon the form. This form has a Timer that updates the text of a TextBox this way: textbox.Text = this.ActiveControl.Name; I notice that…
CaTx
  • 1,421
  • 4
  • 21
  • 42
-3
votes
1 answer

How to read content of text file as Javascript?

I want to write a function in javascript that reads text file and if it contains any javascript function in that text file then instead of reading it just as text, my function will read it as javascript. Like: const toBeRead = () => true; //This…
Suleman Ahmad
  • 452
  • 1
  • 5
  • 14
1 2 3 4
5