I'm making a client app for Windows 10. I have a problem where I'd like to open-source my code, but leave the API key invisible to other people. This is the relevant portion of my source file:
private const string ApiKey = "YOUR_API_KEY";
I'd like to have this transformed to
private const string ApiKey = "THE_ACTUAL_API_KEY";
when it is compiled. How would I go about doing this?
edit: Sorry for any ambiguities; I was asking how to prevent viewers of the source code on GitHub from seeing the string, whilst not having to change it during local builds. This question does not relate to encryption in any way.