Fact Pandit

Fact Pandit Fact Pandit

Niner since 2008


  • Inside C# 4.0: dynamic typing, optional parameters, covariance and ​contravaria​nce

    I am not sure whether "dyanamic" key word is a good feature or not. I think, if MS wants to provide run time object type resolution support in C#, it should have provided with a library or some thing. I don't like C# becoming another C++.

    I like the new covariance feature

    I like the named parameters, but I don't like changing the order. Also I don't like optional parameters feature. That creates an illusion and makes programmers to worry on non business aspects.

    My suggestion for optional parametes is:

    In the method declaration Use attributes to configure default values and while the programmer making invokation of that method let intellisence kicks in for filling the defaul parameteres.