9
shouts

Web 2.0 | Dynamic Typing in C# 4.0

published 225 days, 3 hours, 6 minutes ago posted by farooqkaiserfarooqkaiser 225 days, 17 hours, 11 minutes ago
Thursday, August 06, 2009 11:11:36 AM GMT Wednesday, August 05, 2009 9:06:29 PM GMT

C# 4.0 introduces a new static type called dynamic. When an instance variable is defined with the type dynamic, the compiler ignores the call and won't complain. These actions are picked up at runtime. Here are comparison with C# 3.0 and C# 4.0 using Dynamic Types. Let say I the following code in C# 3.0     // will not work in c# 3.0        object o = "farooq";        Console.Write(o.Insert(o.Length, " Kaiser ")); 

     

// will work in c# 3.0       object o = "farooq";       string myN...

category: ASP.NET | clicked: 58 | | source: www.fairnet.com | show counter code
tags: .Net 4.0, C# 4.0