相关疑难解决方法(0)

C#动态编译和"Microsoft.CSharp.dll"错误

我正在做的例子可以在这里找到.所以我试图在C#脚本中运行IronPython:

蟒蛇:

def hello(name):
    print "Hello " + name + "! Welcome to IronPython!"
    return

def add(x, y):
    print "%i + %i = %i" % (x, y, (x + y))
    return

def multiply(x, y):
    print "%i * %i = %i" % (x, y, (x * y))
    return
Run Code Online (Sandbox Code Playgroud)

C#:

using IronPython.Hosting;
using IronPython.Runtime;
using Microsoft.Scripting.Hosting;
using System;

namespace IntroIronPython
{
    class IronPythonMain
    {
        static void Main(string[] args)
        {
            // Create a new ScriptRuntime for IronPython
            Console.WriteLine("Loading IronPython Runtime...");
            ScriptRuntime …
Run Code Online (Sandbox Code Playgroud)

c# ironpython dynamic .net-assembly

6
推荐指数
2
解决办法
9261
查看次数

标签 统计

.net-assembly ×1

c# ×1

dynamic ×1

ironpython ×1