In this section you will see how to use a ready-made code
snippet. I will assume you are currently working with an open web application
in Visual Studio 2005.
Create a new ASP.NET page, and then flip to the code view so
that you will be able to add a code snippet.
Click on Tools, then Code Snippet Manager; you will be faced
by the following figure
I have selected the prop code snippet included inside the
Visual C# package. You can also select any other code snippet belonging to
Visual C# or Visual Basic.
In the location section, you can see the location of the
code snippet which is the same as mentioned in one of the sections in the
article. The left pane shows the Header section of the prop code snippet.
You select a code snippet and press OK. You then see the
code snippets code emitted on the page where you are adding the code snippet
as follows:
private int myVar;
public int MyProperty
{
get { return myVar;}
set { myVar
= value;}
}
The words highlighted by green are the replicable values
defined inside the Declarations section of the code-snippet. As you can see,
they have taken their default values as defined. Now, the developer should
either change the default values to meet his/her needs or keep them the same.