Hi,

I think every C# developer has allready used Visual Studio 2003 or 2005.
There used to be a code snippet who “prop” which gave the following result:

private int myProperty;

public int MyProperty
{
      get { return myProperty; }
      set { myProperty = value; }
}

The code snippet still exists but has the following result:

public int MyProperty { get; set; }

This has the same function but in many applications you want to be able to be able to use those private variables and keep het public properties seperated.
Therefore I’ve written a custom code snippet.

The only thing you need to do is to download the codesnippet here.
You can save this anywhere you like.

Then you open Visual Studio 2008 –> Tools –> Code Snippets Manager.. (Ctrl+K, Ctrl+B).

You select by language Visual C# and click Import –> choose your saved file and press ok.

Now you can use “prope” in your code (type “prope” and press tab twice) and you will see the result, I’ve added a region arround the property to clean up the code if you collapse it (you can easely remove this code).

If there are still some questions pls don’t hesitate to contact me.

Cheers,

Sem