C# Configuration Files

后端 未结 5 1940
说谎
说谎 2021-02-03 14:58

Okay, so a while ahead I posted how to read other config files of other programs (here is the link Previous Post. I managed to do it. But now there is another problem. The scena

5条回答
  •  独厮守ぢ
    2021-02-03 15:48

    Well, I figured it out myself after debugging for almost 5 hours, Damn!

    The problem was when I used OpenFileDialog to get the file path, it changed the current directory to the one which is selected in the dialog, so the program couldn't find the config file. All I did was to set the RestoreDirectory property of OpenFileDialog to true and poof it worked

    Thanks everyone, ChrisF, Eoin Campbell and pablito.

提交回复
热议问题