【发布时间】:2011-04-07 21:32:00
【问题描述】:
假设我有以下代码:
public static class Foo
{
public static void Bar() {}
}
在 IronPython 中,我想要:
Bar()
不必包含 Foo 就行了。现在,我知道我可以说:
var Bar = Foo.Bar
Bar()
但我想在我的 C# 代码中使用 SetVariable 将 Bar 添加到 ScriptScope。我该怎么做?
【问题讨论】:
标签: c#-4.0 ironpython