Compile simple string

后端 未结 6 1817
星月不相逢
星月不相逢 2021-02-15 13:57

Was just wondering if there are any built in functions in c++ OR c# that lets you use the compiler at runtime? Like for example if i want to translate:

!print \"         


        
6条回答
  •  无人共我
    2021-02-15 14:41

    In C# you can create a .NET "CodeDom" tree and then compile this using the .NET compiler. This gives you full access to most features of .NET.

    See the "System.CodeDom" namespace or the MSDN help for CodeCompileUnit for details.

提交回复
热议问题