Coffeehouse Post

Single Post Permalink

View Thread: A Petition to 'Save' C# !!!
  • User profile image
    TommyCarlier

    I think the new features in C# 2.0 (and what I've seen from C# 3.0) really improve the language a lot. I believe that things like generics actually make C# more elegant. What do you like more? This:

       ArrayList x = new ArrayList();
       ...
       int a = (int)x[i];

    Or this:

       List<int> x = new List<int>();
       ...
       int a = x[i];

    In C# 3.0, the first line can even be reduced to:

       var x = new List<int>();