Where did my Property Snippet go in Visual Studio 2008?

by Kindler Chase 4/12/2008 8:34:00 PM

I've been spending a fair amount of my time over the past couple of weeks digging into Windows Workflow Foundation with Visual Studio 2005 and .NET 3.0/3.5 with the assistance of Pro WF: Windows Workflow in .NET 3.5. This weekend I decided to create a virtual machine with Visual Studio 2008 and try out the new IDE. As I was building a Class in VS2008 I called upon the trusty Property snippet (aka, "prop" + tab) to generate a Property along with its backing variable. Huh? Is the snippet broken in VS2005?

Not being the brightest person, I thought there was a bug in VS2008. The resulting snippet ended up as:

public Guid InstanceId
{
    get;
    set;
}

What I expected was:

private Guid _instanceId;
public Guid InstanceId
{
 
    get
    {
        return _instanceId;
    }
 
    set
    {
        _instanceId = value;
    }
 
}

Is this a bug in Visual Studio 2008?

Nope. I come to find out that .NET 3.0/3.5 has gained Automatic Properties. I'm the first to admit that I do not fully comprehend an Automatic Property. However, I now have a little more knowledge in my arsenal.

How do I get my Visual Studio 2005 Property Snippet back into Visual Studio 2008?

I could re-hash what others have already done and add my own little twist on my method. Being the lazy developer I am, I'll just point you to a couple of good blog posts that'll steer you in the right direction:

Enjoy!

Related posts

Add comment


 

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live preview

9/8/2008 11:44:23 AM

Powered by BlogEngine.NET 1.3.1.0
Theme by Mads Kristensen

Kindler Chase

Kindler Chase This is SharePoint's world. I'm only living in it.

Your host, on the right, with my better half, Sadi.
  E-mail me Send mail

Calendar

<<  September 2008  >>
MoTuWeThFrSaSu
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345

View posts in large calendar

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2007-2008

Sign in