0
How can you edit a programs own .cs file inside the code?
I tried to read a programs own .cs file, but I was able to only read it in hexadecimal. How could I edit is as a text?
2 ответов
0
Editing the program's .cs file will have no effect at runtime, but the code will just be changed the next time you run it. The way csharp works, there are programs called compilers reading the file and turning it to a .exe file. If you're using visual studio you probably never wouldv'e guessed, but there really isn't anything that'll change by doing that. If you could tell me what you were trying to achieve, maybe i'll find a way to solve it inside the code, instead of at runtime.
0
I know that editing the .cs is not going to change the current running .exe. My goal is not that. I'd like to write a program, that edits a .cs file, then compiles it and executes it.