Questions tagged [textwriter]

TextWriter is an abstract base within the .NET Framework, and represents a writer that can write a sequential series of characters.

73 questions
0
votes
1 answer

The value of local integer variables is not written correctly using TextWriter

So the problem is this I declare the variables and open the stream at the begining of the method: int i = 0; int FailedToCopyImages = 0; int NumberOfCopiedImages = 0; int PreviouslyCopiedImages = 0; TextWriter tw = new…
Leron
  • 9,546
  • 35
  • 156
  • 257
0
votes
1 answer

How can I write a text in GLUT?

How can I write text in GLUT and C++?
ShakeryGO
  • 29
  • 3
0
votes
1 answer

Class not serializing to XML File

The code below does not output a stream. Looks correct to me but doesn't work. LineItem i1 = new LineItem() { Id = 1, PartNumber = "abc" }; LineItem i2 = new LineItem() { Id = 2, PartNumber = "def" }; LineItem i3 = new LineItem() { Id = 3,…
Liger86
  • 35
  • 1
  • 5
0
votes
3 answers

How to reopen a TextWriter object? Ist this posible?

I have a new project that I'm working on that uses a TextWriter object to serialize a class. Something like this: TextWriter txtStream = new StreamWriter("xmlStreamFile.xml"); xmlSel.Serialize(txtStream, gp); // gp is the class I want to…
Alin
  • 1,044
  • 6
  • 20
  • 42
-1
votes
1 answer

Declaring new TextWriter with StreamWriter causes "System.IO.IOException: 'The process cannot access the file"

I have the file being used by another process. However I need to be able to save to it using TextWriter (C# .NET). What can I do to get around this? ("The Process cannot access the File error" being thrown on new StreamWriter(filePathName) …
user3312266
  • 187
  • 1
  • 4
  • 14
-1
votes
2 answers

How to get full path of file using File.WriteAllText in C#?

I have added key in settings file as .I need to pass this path to File.WriteAllText and concatenate as c:/Data/Test/XML_Files/TestFile but the path is taken only till…
-1
votes
1 answer

How do I read this line?

What exactly does this statement mean? TextWriter textWriter = new StreamWriter(@System.Environment.GetEnvironmentVariable("OUTPUT_PATH"), true); I have learned dotnet but haven't worked in any of the development project. Now that I am looking for…
Saranya
  • 69
  • 1
  • 4
-1
votes
1 answer

vb.net edit a file based on criteria and save it

I have a file that has dates and results of tests, written line by line. I would like to edit the file such that any line that does not have today's date is deleted and then the file is saved (with the unwanted lines deleted). Help will be greatly…
MordC
  • 61
  • 3
  • 11
-1
votes
2 answers

Buffered StreamWriter for writing over a long period of time

I've got a program that will be running over a long duration (hours), and regularly writing output to a text file. I'm looking to use a TextWriter implementation to write to the file, and I am concerned that keeping the file locked open during the…
Serge
  • 1,974
  • 6
  • 21
  • 33
-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

how to implement textwriter animation android to layout?

i've try to follow the tutorial from Android character by character display text animation and it works. but i'm confuse how to use animation textwriter inside layout xml. anyone please help me how to implement it to layout, please ? thanks
ZigZag
  • 1
-3
votes
2 answers

StreamWriter.Write is not writing all the data

I am trying to create a text file by a loop data .each loop data i have send to another method and creating the text file as blow . //another method each and every for loop time this method will run. public void TextFileGen1(string pdate, string…
ABCD
  • 379
  • 1
  • 8
  • 25
-3
votes
1 answer

XML: Writing to file is null?

I've debugged it so far, the list has the values.. however its not writing them out to the file. I'm not sure why it's null. The GameObjects class holds all the fields. GameObjectData is just for the list. Then ChestPlate inherits from GameObjects.…
callum
  • 11
  • 1
  • 4
1 2 3 4
5