Skip to main content

All Questions

Tagged with
1 vote
1 answer
46 views

How to store specific lines in a text file in a array (i.e 2 seperate bank accounts)

I am doing a ATM project for my computer science class and we are required to make an ATM that stores and reads accounts in a text file. I am stuck trying to figure out how I can get an array in the ...
Optik's user avatar
  • 11
0 votes
1 answer
2k views

How to update/modify values in Json File

I want to update values in the following type of json file in c# {"ItemName":"ABC","Id":1} {"ItemName":"DEF","Id":2} {"ItemName":&...
john oliver's user avatar
-1 votes
1 answer
797 views

The process cannot access the file because it is being used by another process Streamwriter

I am getting an error that my textfile that is used to create and save my dictionary is being used by another process, I have used Process explorer to no result on what could be using my file. Below ...
Avmeade's user avatar
  • 11
-2 votes
1 answer
491 views

C# how can I write data from a two-dimensional array to a text-file and format them in columns?

So I have a two-dimensional array and I want to write all data to a text-file. But I want them to appear in columns in the text-file. (I haven't declared them like this in my code, but I think this is ...
Anonym's user avatar
  • 9
0 votes
0 answers
282 views

Problem when saving a file in a folder, which comes from type byte [] on the server when using WriteAllBytes in C #

I have the following function: private void saveImageByteInFolder( byte[] img) { var path = Server.MapPath("~/Images/prueba.jpg"); System.IO.File.WriteAllBytes(path, ...
Carmen Cisterna Chamblas's user avatar
4 votes
0 answers
283 views

Xamarin.Android and RecordAudio: how to combine file writing and other task

I develop a Xamarin.Android app where I need to record an audio file in a .wav and to display the related spectrogram in the same time. I'm able to perform the 2 tasks separately but not to combine ...
Gold.strike's user avatar
  • 1,287
0 votes
2 answers
839 views

C# Cannot use Streamwriter on a txt file in C# Properties.Resources

I am currently working on an assignment for school where I am trying to write a 2D string array into a text file. I have the array and know its working fine however every time I try to read the file ...
Matthew D'Agostino's user avatar
0 votes
1 answer
1k views

Using a for loop with a stream writer

I am trying to create a question object with several attributes, all of which are stored on a text file and retrieved using a StreamReader. One attribute is an array Choices[]. I need said array to ...
anonymous2506's user avatar
-1 votes
1 answer
90 views

IndexOutOfRangeException error in C# after creating a double loop [duplicate]

The following piece of code generates a IndexOutOfRangeException was unhandled, but I dont know why. The a for-loop is set to be smaller than the i for-loop because the array of arrays is 3x2. I did ...
Erik Lenstrup's user avatar
-2 votes
1 answer
73 views

Program does not contain a static 'Main' method test_test suitable for an entry point, C#

CS 5001: Program does not contain a static 'Main' method test_test suitable for an entry point. The above error is given then I try to run the program along with an error attracted to the txt file ...
Erik Lenstrup's user avatar
-1 votes
1 answer
332 views

How to loop the StreamWriter to write the strings from the ChecklistBox

Good Day! I need help. I want to loop my StreamWriter to write every string from checkListBox in the notepad and make it as batchfile to execute the SQL Script. Situation: every checkLISTbox is an ...
Charlston Mabini Vita's user avatar
0 votes
2 answers
236 views

.NET stream writer Variable format

I'm trying to write a CSV file with a variable output format. The code is fs.WriteLine(String.Format(format, data(0), data(1), ...
Viladimir's user avatar
  • 137
0 votes
1 answer
488 views

Why is my array of struct not resizing with Array.Resize?

I have an array of struct's declared as public struct classMates { public string first; public string last; public string ID; } I am using StreamReader to read in a ...
bsd u's user avatar
  • 77
1 vote
1 answer
422 views

Delete, copy, and paste string in an array in a text file to a new arry in a text file

I need some help with file streaming. I have a program that will record names into a string array that will be written to a .txt file. Then if a user wants to delete a specific string from the array ...
Spr89's user avatar
  • 79
0 votes
1 answer
1k views

Writing Text and Binary to the Same File

I'm having trouble figuring out how to switch between StreamWriter to write out text and FileStream to dump a byte[] into a file. I'm using StreamWriter to manually write out an XML in text (there ...
Jesse Williams's user avatar

15 30 50 per page