Kevin McKelvin

Dynamic Languages & DLR Presentation - Languages UG

14 July 2011

Thanks for the great turn-out at the Microsoft Community Night on 12 July, we had a full room for the languages UG!

For those who weren’t there - I gave a talk on Dynamic Languages and the DLR on Tuesday 12 July.

Here are the resources from the talk:

And here’s the code used to call a Python script from C#, using the DLR interop and dynamic keyword:

var engine = IronPython.Hosting.Python.CreateEngine();
var scope = engine.Runtime.UseFile("greeter.py");
dynamic greeterClass = scope.GetVariable("Greeter");
dynamic greeter = greeterClass();

dynamic s = greeter.sayHello("Kevin!");

Console.WriteLine(s);
Console.Read();

Kevin McKelvin

These are the online musings of Kevin McKelvin. He is the CTO at Resource Guru, and lives in Newcastle upon Tyne, UK.