C# 2010 在运行时编译 XNA 类

发布于 2024-09-27 23:13:15 字数 135 浏览 0 评论 0原文

我想知道如何通过 C# 窗口窗体上的交互来编译和运行 XNA 类。例如,当我从 C# 窗口窗体中单击“Play”按钮时,将编译并运行 XNA 类中内置的游戏。希望我的问题足够清楚。

如有任何帮助,我们将不胜感激:)

提前致谢

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

吲‖鸣 2024-10-04 23:13:15

C# 类可以在运行时编译和运行,看来您正在寻找这一点。您可以搜索 CSharpCodeProviderICodeCompiler 的使用示例来开始使用。

这里是一个非常清楚的示例,说明了如何实现这一目标。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文