rss
twitter
  •  

Discover word Dynamic in C# 4.0

| Posted in Uncategorized |

0

in C# 4.0, Microsoft concentrate on dynamic programming, reed more about dynamic programming at this blog Dynamic Programming thinking more about runtime, let’s

 using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 namespace DynamicDemo 
 {
     class Program 
     {
         static void Main(string[] args)
         {
             dynamic employee = new Employee();
             employee.ID = 3;
             Employee dynamicEmployee = new Employee();
             dynamicEmployee 
         }asdsa

The role of the compiler in these examples is to package together information about what each statement is proposing to do to the object or expression that is typed as dynamic. At run time, the stored information is examined, and any statement that is not valid causes a run-time exception.

Overload resolution occurs at run time instead of at compile time if one or more of the arguments in a method call have the type dynamic, or if the receiver of the method call is of type dynamic.

What Difference between var & dynamic keywords in C#?

Post a comment