Read/write file
Created at 22 Mar 2024, 15:14
Read/write file
22 Mar 2024, 15:14
could anyone help me out about reading and writing files?
i'm looking for a easy way to store a one or two Variables on the filesystem, so the bot can load it when it's starting.
i already have some code in place that writes a file, but its pretty complex, maybe there is a easier way to go around that.
firemyst
23 Mar 2024, 03:11 ( Updated at: 23 Mar 2024, 05:34 )
Ever hear of a search engine called Google? :-)
I would recommend writing your data as json formatted data as it's simple to write, parse, and read the data written:
https://www.google.com/search?q=c%23+read+write+json+file&sca_esv=74866465c804140e&ei=FEb-ZZnkPNPf2roPvcKlgAo&ved=0ahUKEwiZvvfGsomFAxXTr1YBHT1hCaAQ4dUDCBA&uact=5&oq=c%23+read+write+json+file&gs_lp=Egxnd3Mtd2l6LXNlcnAiF2MjIHJlYWQgd3JpdGUganNvbiBmaWxlMgQQABhHMgQQABhHMgQQABhHMgQQABhHMgQQABhHMgQQABhHMgQQABhHMgQQABhHSMAGUIYEWIYEcAF4ApABAJgBAKABAKoBALgBA8gBAPgBAZgCAqACCMICChAAGEcY1gQYsAOYAwDiAwUSATEgQIgGAZAGCJIHATKgBwA&sclient=gws-wiz-serp
Also using Google, you can see there's been several questions/examples on cTrader throughout the years as well:
https://www.google.com/search?q=calgo+write+to+file+site:ctrader.com&sca_esv=74866465c804140e&sa=X&ved=2ahUKEwiDsqCls4mFAxXfzjQHHWjyC58QrQIoBHoECBcQBQ&biw=1920&bih=953&dpr=1#ip=1
@firemyst