Type interference in .Net 2.0

time to read 1 min | 124 words

I just opened SharpDevelop 2, and I got a killer Tip of the Day. You can do this:

? name = new SuperLongVariableName();

And the moment you hit the ; key, it will be replaced to:

SuperLongVariableName name = new SuperLongVariableName();

Now that is a useful feature. It doesn't work with Generics yet, but I really like the concept.