put this snippet:
<?xml version="1.0" encoding="utf-8"?> <CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> <CodeSnippet Format="1.0.0"> <Header> <Shortcut>propn</Shortcut> <Title> Notify Property </Title> </Header> <Snippet> <Declarations> <Literal> <ID>type</ID> <ToolTip>Type</ToolTip> <Default>int</Default> </Literal> <Literal> <ID>field</ID> <ToolTip>Field name</ToolTip> <Default>fieldName</Default> </Literal> <Literal> <ID>property</ID> <ToolTip>Propery Name</ToolTip> <Default>PropertyName</Default> </Literal> </Declarations> <Code Language="CSharp"> <![CDATA[ private $type$ $field$; public $type$ $property$ { get { return $field$; } set { $field$ = value; if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs("$property$")); } } $end$]]> </Code> </Snippet> </CodeSnippet> </CodeSnippets>
inside the propn.snippet file, in this folder: C: \ Users [YOUR_USERNAME] \ Documents \ Visual Studio 2010 \ Code Snippets \ Visual C # \ My Code Snippets
after which you can use this fragment using the shortcut (propn + tab + tab).
The xml snippet is very easy to understand on its own, so you can easily customize it for everything you need.
source share