0
String[,] that can be changebale
I have a sistem of accounts that works on String[,] String[,] accnts={{"User1","pass123"},{"user2","pass234"}} and I want to make a code that can edit this string with console.readline and then save this so when I will open the app the string will be with my changes. open app- I am writing user1 change pass then I wrote something like password321 and closing the app when I return to the app the pass will be password321 and not pass123
9 Answers
+ 1
Start with changing a element in the array.
https://code.sololearn.com/c6Aff62wd95Y
+ 1
I have a sistem of accounts that works on String[,]
String[,] accnts={{"User1","pass123"},{"user2","pass234"}}
and I want to make a code that can edit this string with console.readline and then save this so when I will open the app the string will be with my changes.
open app- I am writing user1 change pass then I wrote something like password321 and closing the app when I return to the app the pass will be password321 and not pass123
+ 1
On pc
console app
+ 1
Both
+ 1
Thx👍🏻😊
Thank you very very much I searched for this answer a lot of time.
+ 1
To save a file in c# have a look at this link
https://www.c-sharpcorner.com/UploadFile/mahesh/create-a-text-file-in-C-Sharp/
To save a 2D-array to file, have a look at this link.
https://social.msdn.microsoft.com/Forums/vstudio/en-US/335aadde-fb4d-41d9-a910-5e1dc39bb3f5/2d-array-to-csv-c-steamwriter?forum=csharpgeneral
if you have any questions please ask.
0
Can you explain more, I do not understand what you are trying to achieve.
Are you having problem with the limitations of the sololearn playground or are you not sure what to code.
Can you explain in steps or pseudo code ?
0
Are you using sololearn playground or an development enviroment on your computer ?
0
Is your problem in changing a element of a 2D array
or
in saving it to a file ?



