none
Can C++ and C# code be self-modifying? RRS feed

  • Question

  • I am trying to prove that modern C++ and C# code cannot be self-modified. Is there any documentation available?
    Wednesday, January 14, 2015 3:40 PM

Answers

  • Hello,

    >>I am trying to prove that modern C++ and C# code cannot be self-modified. Is there any documentation available?

    It is not very clear about what you mean about the “self-modified”, if you mean that you want to generate some additional code which could be used at runtime, this is possible since the .NET provides CSharpCodeProvider Class which could help compile the runtime written code to memory and work with the current running process. However, this should be runtime-generated code. If you mean you want to modify the compiled code by the JITing compiler, this is not possible, for the details reason, you could check this discussion.

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Proposed as answer by PhGr_ Thursday, January 15, 2015 9:29 AM
    • Marked as answer by Fred BaoModerator Friday, January 23, 2015 7:06 AM
    Thursday, January 15, 2015 9:27 AM
    Moderator