Questions tagged [streamwriter.write]
30 questions
0
votes
1 answer
StreamWriter.Writeline throws "Not enough storage is available to process this command." IO exception
I have an application which will copy 1000 files from One folder to another. After each file is copied we will write the Copy Success/Failure information into a separate file. At some time, during writing this copy information in a file,…

Sugumar
- 223
- 1
- 3
- 13
0
votes
1 answer
StreamWriter not writing to location other that exe location
This is my code broken down:
fileName = string.Concat("C:", @"\test.txt");
StreamWriter sw = new StreamWriter(fileName, false);
StringBuilder row = new StringBuilder();
row.AppendLine("Test");
sw.Write(row.ToString());
sw.Close();
This code…

user568551
- 337
- 3
- 11
0
votes
1 answer
Csharp extract data form a .csv file
I'm looking for a short code to give the user the possibilities to choose the city matching with the zip code he types on console.
I have a csv file were all the France zip code are present.
An example:
type the zip code : 75000
1 - paris 1er…
0
votes
1 answer
how to streamWrite a .zip/epub file from response to isolatedStorage if that .zip/hpub file contains .jpg, .woff (web open font format)
Actually i am trying to saving a .zip/.epub file from webResponse into my wp8 isolated storage which contains saveral .html, .png, .jpg and .woff ( Web Open Font Format) files.
my following code is saving only .html and .png files from the…

Ashish-BeJovial
- 1,829
- 3
- 38
- 62
0
votes
2 answers
StreamWriter trouble writing doubles to .txt file (C++)
I'm trying to write some double values to a text file the user creates via a SaveFileDialog, but everytime I do a streamWriterVariable->Write(someDoubleVariable), I instead see some kind of weird ASCII character in the text file where the double…

Nate
- 65
- 1
- 7
0
votes
3 answers
Streamwriter is clearing the text from my text file then updating
I'm trying to get my streamwriter to add text onto the end of the text file but for some reason, it is just replacing the text with whatever I have entered. Any help is appreciated to fix this.
StreamWriter sw = new StreamWriter(Server.MapPath("~")…

Anthony Johnson
- 273
- 3
- 4
- 11
0
votes
1 answer
Writing int as byte using streamwriter in VB.NET
I have a java function, and am trying to mimic the same functionality in VB.NET.
The Java function:
String text = “ABCDEFG”
int length = text.length();
int l1 = length >> 8;
int l2 = length % 256;
swriter.write(new byte[] {(byte)l1, (byte)l2});
My…

Bhaskar
- 153
- 2
- 9
0
votes
1 answer
System.Text.Encoding value
I'm getting an error with the optional argument, it says "Constant expression is required"
How I can resolve the problem?
Private Function Write_Text_To_File(ByVal Text_File As String, _
ByVal Text As String, _
…

ElektroStudios
- 19,105
- 33
- 200
- 417
0
votes
1 answer
File writing statement does not work properly
I have the following function:
static public void logEntry( string expression, string result )
{
string content = expression + "=" + result + "\n";
if (!logFileExists()) File.Create( logFileName );
StreamWriter sw = new StreamWriter(…

Victor
- 13,914
- 19
- 78
- 147
-1
votes
3 answers
Unable to Save all the elements of a List to a text file
I am trying to save all the contents of a List into a text file but I am unable to do . Below is the code that I have tried
// here is my list type
List list2 = new List();
//code below for saving the contents of the list into…

ankit goel
- 43
- 6
-1
votes
2 answers
Writing to a new line in Visual Basic with Streamwriter
Every time I press "button2" it should take the data from various text boxes and write them into my text file on a new line. For some unknown reason, the program just overwrites everything in the text file, whereas I need it to write to a new line.…

Alfie F
- 1
- 1
- 6
-1
votes
2 answers
Write a character at the end of an array
Here's my code:
for (int j = 0; j < bufferreader.Length; j++)
{
using (StreamWriter sw = File.AppendText(@"C:\Users\yamald\Documents\Normal.data"))
{
//sw.Write();
if (bufferreader.length != null)
{
…

Yamur
- 339
- 6
- 20
-2
votes
1 answer
Screamwriter outputting to Vietnamese, not ASCII (English)
In a nutshell, creating a ASCII text file that records polling data from a printer under test. The expected output should be US English, but the text file is in Vietnamese.
Example:
the_Maker = "Epson", SubModel = "T88V", serial_num = PD9F393594,…

Daniel Steele
- 33
- 1
- 1
- 7
-2
votes
1 answer
Write 2D List to File Error: System.InvalidOperationException:
I have a List double [,] array.
When i try to below code c# to write 2d double list array to file i got error.
"System.InvalidOperationException: 'Collection was modified; enumeration operation may not execute.'"
public void Write(List…

K.Ense
- 3
- 2
-3
votes
1 answer
Manipulating input and output streams from one file to another
I have a new file every few seconds that looks like this:
23
45
21
1
9
23
42
22
40
11
33
32
18
11
12
32
22
7
37
30
In this text file to be read there is one number per line that will be between 1-40. These…

Deland
- 1
- 3