Stream problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • csharpula csharp

    Stream problem


    Hello,
    I am using the following code in COnsole C# application:
    TextWriter tw = new StreamWriter(Lo gFileName);
    while ((inputLine = _streamReader.R eadLine()) != null)
    {
    lineNumber++;
    if (lineNumber ReadLines)
    {
    tw.WriteLine(in putLine);

    }
    }
    The problem is that the output is written in file and in console and I
    want it to be written in file only. How can I avoid it be written to the
    console?

    Thank u!

    *** Sent via Developersdex http://www.developersdex.com ***
  • Kalpesh

    #2
    Re: Stream problem

    Is this the only code in your console application?
    I suspect some other code before this must be writing to the console

    Kalpesh

    Comment

    Working...