Grasshopper

algorithmic modeling for Rhino

Hi,

I am trying to run python module inside visual studio c#, but I get an error after line scope.Add = new Func((x, y) => x + y);

Error:
Missing compiler required member :

'Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create'

Is it possible to solve this issue?

using System;

using IronPython.Hosting;

using IronPython.Runtime;

using Microsoft.Scripting;

using Microsoft.Scripting.Hosting;

using Microsoft.CSharp;

namespace Bob.Meshes {

public class pythonFromCShapr {

ScriptEngine engine = Python.CreateEngine();

public pythonFromCShapr() {

}

public void something() {

dynamic scope = engine.CreateScope();

scope.Add = new Func/font>int, int, int>((x, y) => x + y);

Console.WriteLine( scope.Add(2, 3));

}

}

}

Views: 380

About

Translate

Search

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service