C# – First steps with C# and .NET – part 011 .

Today I will show you how can use Dynamic Language Runtime with IronPython.
The dynamic language runtime (DLR) is a runtime environment that adds a set of services for dynamic languages to the common language runtime (CLR). The DLR makes it easier to develop dynamic languages to run on the .NET Framework and to add dynamic features to statically typed languages. see the online documentation.
I use Visual Studio 2019 and .NET Framework 4.7.2 with my Console C# project named DynamicLanguageRuntime_001.
Let’s install the package with Visual Studio by open the console using the main menu: ToolsNuGet Package ManagerPackage Manager Console command.

Use Solution Explorer use right-click on References item from your project and use Add Reference …
Into the new window dialog named Reference Manager on the AssembliesFramework uses the edit box to search IronPython.
Then use the checkbox to select these two options: IronPython and IronPython.Modules.
See the next screenshot:

I create a simple source code with comments to see how this working.
The source code for my project is this:

The last step is to build and run it.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.