Home > View Post

Small but juicy features coming in Orcas

I'm getting pretty stoked about the upcoming release of Orcas. As usual, I think it's some of the smaller things that are going to make the biggest difference. Here's one of my favourite little Orcas treats:

How many times do you write this...

private string _myProperty;

public string MyProperty
    get { return _myProperty; }
    set { _myProperty = value; }

Well thanks to Orcas' super helpful compiler now you only have to write this and he'll create the private field for you.

public string MyProperty { get; set; }

After all, if it's literally just a standard property, there's nothing funky you're likely doing to the private member that you couldn't do to the public. And you can always revert to the more verbose style if you do need to encapsulate some behaviour on the getter or setter.

Nice. A small thing but it's little pieces like this that add up to make a big difference.

What's particularly nice about this is that, because the compiler is injecting the extra magic here, you can actually build a .NET Framework 2.0 assembly with these helpful property shortcuts (provided you're using VS9 of course).

Here's the code as interpreted by Reflector.

Generated code as seen from reflector

Choosing what Framework you want to target in Orcas is as easy as selecting a dropdown on the Project Properties panel.

Target Framework in Orcas' Project' Properties

Sadly you can't choose .NET 1.x but you can choose all the releases since 2.0, including the 3.0 release and, of course, .NET 3.5.

And finally

I posted a while back about how I love CoolCommands and in particular it's Open Containing Folder feature. Well at last... it made it into VS.

Open Folder in Visual Studio Orcas

Tags: .NET

Josh Post By Josh Twist
9:37 AM
03 Jun 2007

» Next Post: You have to be loving Linq and Lambda
« Previous Post: Windows Longhorn Server finally gets a name

Comments are closed for this post.

© 2005 - 2022 Josh Twist - All Rights Reserved.