Type inference in C# 3.0

My friend Paulo published a post that talks about type inference and how it might evolve in the next years. Even though type inference”s main objective is to support LINQ (in fact, most of the new stuff that C#3.0 introduced is only there to support LINQ), I must say that I”ve been enjoying it a lot and I”ve been using it whenever possible. Initially, I wasn”t really into using var because I thought that it would reduce the readability of my code and I”ve only started using it after installing one of the nightly builds of R#. In fact, I was one of the first to complain on the R# forums about it.

Anyway, I decided to give it a try and guess what? I”ve noticed that using this approach will not reduce my code readability. In fact, I”ve noticed an improvement on my local variables” names. I know that this might look really strange at first, but believe me: give it a try and I bet you”ll end up loving it (and let me tell you that this is helping my with my carpal tunnel syndrome :),,)


~ by Luis Abreu on April 26, 2008.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: