All Questions
Tagged with streamwriter file-io
50
questions
0
votes
1
answer
67
views
Need help editing fields inside of a CSV file?
I'm able to edit each field, however this only works on the first line in the CSV file. If I attempt to input a patient ID that is on the second or third row etc it will not edit any of that data. ...
0
votes
0
answers
242
views
Write JSON Object to file- append not working
I'try to save my custom JSONObject into the file.Everything working correct but I can't append json into file.For example,If I click twice to save json,in my file I have one element.Here is a my ...
0
votes
2
answers
744
views
Writing CSV with quotes to match source file - using VB.net, and TextfieldParser
Sorry, very casual programmer, haven't coded in many years ..(primarily in VB6)
I have googled, and read .net details on each file class, seen lots of examples, but have no idea how to get modified ...
1
vote
0
answers
555
views
Parsing through multiple file contents inside a foreach loop C#
I have a CSV file that I read using LumenWorks CSV, inside the CSV I have multipole filepaths, I have written the program to extract the file paths from CSV like:
while (csv.ReadNextRecord())
{
...
2
votes
1
answer
107
views
Read the file faster and get the pixel color quickly?
I've got the following code and it works properly, however, it works really slowly and to read the file with the recording and analyze each pixel - it takes way too long. Is there any way I could make ...
2
votes
1
answer
1k
views
How to append data to file using SaveFileDialog
I want to write data to file, so I use SaveFileDialog object:
Public Class Form3
Inherits Form
Public callerForm3To1 As Form1
Dim fileStream As Stream = Nothing
Dim fileSW As ...
-1
votes
2
answers
805
views
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 ...
-1
votes
2
answers
174
views
Why does my call to file.WriteLine() fail to write all contents of the StringBuilder to the file?
I'm trying to write an html file to disk via a StringBuilder and File.WriteLn(), but the file is written lacking a few lines, and is thus useless. My code is:
private void BuildAndWriteHTMLFile()
...
0
votes
1
answer
393
views
How does StreamWriter class actually work?
Considering a file named !file io test.txt, containing the following lines:
1|adrian|louis|50000
2|jeff|potato|200000
3|michael|de santa|980000
4|jemmy|mccormic|500400
5|jack|cohen|4300000
6|ethan|...
0
votes
1
answer
1k
views
Why does File.Open() not open the file?
I am implementing a Save File button in my VB.NET Windows Forms application.
I am attempting to encapsulate the normally expected behaviour of Save buttons in Windows applications. I.E: If a file was ...
0
votes
1
answer
79
views
how to write text to a file in .net for windows store.. for crying out loud [duplicate]
I have a list of strings.
I want to output them to a txt file.
Very simple in .net traditionally, even done with a single line of code.
However with .net for windows store:
File.writeAllLines - ...
0
votes
1
answer
193
views
Random lines not being written from streamwriter C#
I am currently working on fixing an issue with some legacy code. The code reads a csv, checks the data for validity, then writes the document to an outfile.
I am currently having difficulty ...
2
votes
1
answer
152
views
StreamWriter not appending to file, instead creating a new file in different directory
I am attempting to write from one file to a temp file after making certain changes to some of the data in the source file. This was working until I extracted this logic into its own function.
After ...
1
vote
1
answer
2k
views
Why is StreamWriter adding in an extra blank line while File.WriteAllLine does not?
I was originally using File.WriteAllLines to write out a large list of records to a local text file. This list is set to expand, so to avoid any memory issues I decided to follow the advice given in ...
0
votes
1
answer
2k
views
StreamWriter encoding string incorrectly
I'm trying to append a base64 string to an existing file. Here's my code:
StreamWriter output = new StreamWriter(file, true, Encoding.ASCII);
output.WriteLine(output.NewLine + str);
Here file is the ...