简体   繁体   中英

C# 2010 compile XNA class at runtime

I'm wondering how to compile and run a XNA class from an interaction on a C# Window Form. For example, when I click button "Play" from a C# Window Form, the game which is built in XNA classes will be compiled and run. Hope my question is clear enough.

Any helps are appreciated :)

Thanks in advance

C# classes can be compiled and run on runtime, it seems you're looking for that. You can search for examples of uses of CSharpCodeProvider and ICodeCompiler to get you started.

Here is one pretty clear example of how this is achieved.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM