textwriter 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
3
Solved
I started off doing something as follows:
using (TextWriter textWriter = new StreamWriter(filePath, append))
{
foreach (MyClassA myClassA in myClassAs)
{
textWriter.WriteLine(myIO.GetCharArray(...
Javed asked 26/6, 2013 at 16:16
2
Solved
I have two classes, none of which I can change in any way:
Class 1: Takes a TextWriter as constructor parameter and uses it as an output stream.
Class 2: Provides a method WriteLine(string).
I n...
Forefinger asked 18/7, 2013 at 0:35
2
Solved
i am writing text to a TextWriter. i want the UTF-16 Byte Order Mark (BOM) to appear in the output:
public void ProcessRequest(HttpContext context)
{
context.Response.ContentEncoding = new Unicod...
Gamba asked 6/9, 2012 at 21:14
1
Solved
using (TextWriter writer = File.CreateText(path2))
{
writer.Write(SomeText);
}
This is problematic piece of code. When I write to file, it's ok, until other app open the file. Then I get error...
Pallua asked 3/9, 2012 at 15:36
2
Solved
I’m writing a console application that has a custom logger in it. The logger needs to color anything sent to Console.Error in red. I now have third party references that also write to Console.Out a...
Silvester asked 10/5, 2012 at 11:11
2
I'm trying to write a text file with Unix-style newlines with my C# program.
For some reason the following code doesn't work:
TextWriter fileTW = ...
fileTW.NewLine = "\n";
fileTW.WriteLine("He...
Arcature asked 20/10, 2011 at 20:20
5
Solved
I am trying to make a text file in memory, add some lines to it and at the end save the file in a text file. I can handle the savedialog part but I dont know how to get the text file from memory. A...
Dufrene asked 18/4, 2011 at 12:31
2
Solved
I have written a method that accepts a TextWriter as an argument (Usually Console.Out, but not necessarily).
When I call this method, some progress info is written to the TextWriter.
However, sinc...
Cassius asked 14/9, 2010 at 11:36
1
© 2022 - 2024 — McMap. All rights reserved.