Skip to content

Instantly share code, notes, and snippets.

@jimschubert
Created September 23, 2011 13:08
Show Gist options
  • Save jimschubert/1237291 to your computer and use it in GitHub Desktop.
Save jimschubert/1237291 to your computer and use it in GitHub Desktop.
Auto-implemented virtual property snippet for C#
<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>propv</Title>
<Shortcut>propv</Shortcut>
<Description>Code snippet for an automatically implemented virtual property
Language Version: C# 3.0 or higher</Description>
<Author>James Schubert</Author>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>type</ID>
<ToolTip>Property type</ToolTip>
<Default>object</Default>
</Literal>
<Literal>
<ID>summary</ID>
<ToolTip>Property Summary</ToolTip>
<Default>Property's value</Default>
</Literal>
<Literal>
<ID>property</ID>
<ToolTip>Property name</ToolTip>
<Default>PropertyName</Default>
</Literal>
</Declarations>
<Code Language="csharp"><![CDATA[///<summary>
/// Gets or sets the $summary$
///</summary>
public virtual $type$ $property$ { get; set; }$end$]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment