Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

C# Actually does have duck typing via the DLR (Dynamic Language Runtime) now. You can totally define a method as

    public dynamic DoDynamicStuff(dynamic wooDynamix)
    {
        Console.WriteLine(wooDynamix.DynamicProperty1);
    }


Right but it doesn't have the static kind the compiler uses for foreach loops or dictionary initializers.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: