DCSIMG
prop2005.snippet – My small code snippet for VS2008 ( and above ) - Adlai Maschiach

Adlai Maschiach

" You have to show in order to be seen "

News

Favorite Links

news

CardSpace

Books

Other InfoCards Proj

Virtual Earth

WSS / Sharepoint

SOA , Biztalk & ESB

CLR / .NET

prop2005.snippet – My small code snippet for VS2008 ( and above )

Due to the fact that I still program for “Older” systems like Moss2007 , but still want the development ease and speed of visual studio 2008 ,  I had to write my own code snippet for support of “old style” prop code snippet
   1: <?xml version="1.0" encoding="utf-8" ?>
   2: <CodeSnippets  xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
   3:     <CodeSnippet Format="1.0.0">
   4:         <Header>
   5:             <Title>prop .NET 2.0</Title>
   6:             <Shortcut>prop2005</Shortcut>
   7:             <Description>Code snippet for an automatically implemented property</Description>
   8:             <Author>Adlai Maschiach</Author>
   9:             <SnippetTypes>
  10:                 <SnippetType>Expansion</SnippetType>
  11:             </SnippetTypes>
  12:         </Header>
  13:         <Snippet>
  14:             <Declarations>
  15:                 <Literal>
  16:                     <ID>type</ID>
  17:                     <ToolTip>Property type</ToolTip>
  18:                     <Default>int</Default>
  19:                 </Literal>
  20:                 <Literal>
  21:                     <ID>property</ID>
  22:                     <ToolTip>Property name</ToolTip>
  23:                     <Default>MyProperty</Default>
  24:                 </Literal>
  25:             </Declarations>
  26:             <Code Language="csharp">
  27:           <![CDATA[
  28:       #region $property$    
  29:       [System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)]
  30:       private $type$ _$property$;
  31:       
  32:       public $type$ $property$ 
  33:       {
  34:         [System.Diagnostics.DebuggerStepThrough()]
  35:         get
  36:         {
  37:           return _$property$;
  38:         }
  39:         set
  40:         {
  41:           _$property$ = value;
  42:         }
  43:       }
  44:       #endregion
  45:       
  46:       $end$]]>
  47:             </Code>
  48:         </Snippet>
  49:     </CodeSnippet>
  50: </CodeSnippets>

The snippet can be downloaded from here

Comments

No Comments

Leave a Comment

(required) 

(required) 

(optional)

(required) 


Enter the numbers above: