I am not a big fan of dynamic type in C#, however there are certain situations in which it can be handy. Let's assume that we have following piece of code (which I encounter quite often at my work) public abstract class Weapon { //some properties } public class Gun : Weapon { //some properties } // more derived types var weaponService = new WeaponService(); IList

Tagi: .NET 4.0, C#, dynamic
Dziel się z innymi:
.NET Blog: Dynamic type can be useful

Windows 3467 dni, 18 godzin, 9 minut temu nocturn 243 pokaż kod licznika zwiń

Wczytywanie artykułów...