A New Internet Library: Add Your Website/Blog or Suggest A Website/Blog to our Free Web Directory http://anil.myfunda.net.

Its very simple, free and SEO Friendly.
Submit Now....

Friday, January 30, 2009

Why no var on fields?

In my recent request for things that make you go hmmm, a reader notes that you cannot use "var" on fields. Boy, would I ever like that. I write this code all the time:

private static readonly Dictionary<TokenKind, string> niceNames =
  new Dictionary<TokenKind, string>()
  {
    {TokenKind.Integer, "int"}, ...

Yuck. It would be much nicer to be able to write

priva...Full Article.

No comments:

Post a Comment

Post your comments here:

Originals Enjoy