none
Modify / Add Variable to exe file RRS feed

  • Question

  • In my project I want to add a string Variable to my code and want the program to modify it when event occurs , So when this file coped to another PC , It can reads the new string value

    Ex:

    string VersionOfGame = "1";

    and later program will set it for another value

    VersionOfGame = "5";

    And then open from other PC and reads "5" not "1" , Is it possible?

    Wednesday, March 11, 2015 3:17 PM

Answers

  • 1. "want the program to modify it when event occurs" once an exe is created you can not modify it.

    Solution: you can store this value in an external file [app.config \ settings] and modify it when ever you want.

    2. "So when this file coped to another PC , It can reads the new string value"

    What i am understanding is that you want every copy of your application to have a unique value for VersionOfGame ? (Please explain)


    Please mark those posts as answer which answers your question. Faraz

    • Proposed as answer by Kristin Xie Thursday, March 12, 2015 9:31 AM
    • Marked as answer by Kristin Xie Friday, March 20, 2015 9:41 AM
    Wednesday, March 11, 2015 5:35 PM