Dynamic Language Runtime

Learn to use the dynamic typing capabilities of .NET.

We'll cover the following

Introduction

Although C# is a statically-typed language, some dynamic features have been added in recent versions of the language. A new functionality called Dynamic Language Runtime (DLR) was added in .NET 4.0.

To understand the meaning of this feature, we should consider the difference between statically and dynamically-typed languages. In languages with static typing, the identification of all types and their members (properties, methods) occurs at the compilation stage. Consider the following Course:

public class Course
{
	public string Title { get; set; }
}

We have access to the Title property when we create an instance of the class. If we try to access a member that doesn’t exist, we get a compile-time error:

Get hands-on with 1400+ tech skills courses.