Tri
Tri

Reputation: 535

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

Upvotes: 0

Views: 338

Answers (1)

steinar
steinar

Reputation: 9663

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.

Upvotes: 1

Related Questions