Created
April 9, 2011 04:26
-
-
Save nissuk/911122 to your computer and use it in GitHub Desktop.
Visual Studio: コードスニペットの例 (C# 2.0用のプロパティのスニペット)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<Title>prop2</Title> | |
<Shortcut>prop2</Shortcut> | |
<Description>プロパティとバッキング フィールドに対するコード スニペット (C# 2.0)</Description> | |
<Author>nissuk</Author> | |
<SnippetTypes> | |
<SnippetType>Expansion</SnippetType> | |
</SnippetTypes> | |
</Header> | |
<Snippet> | |
<Declarations> | |
<Literal> | |
<ID>type</ID> | |
<ToolTip>プロパティの種類</ToolTip> | |
<Default>string</Default> | |
</Literal> | |
<Literal> | |
<ID>property</ID> | |
<ToolTip>プロパティ名</ToolTip> | |
<Default>Property</Default> | |
</Literal> | |
<Literal> | |
<ID>property2</ID> | |
<ToolTip>プロパティ名</ToolTip> | |
<Default>プロパティ</Default> | |
</Literal> | |
</Declarations> | |
<Code Language="csharp"><![CDATA[private $type$ _$property$; | |
/// <summary> | |
/// $property2$を取得、設定します。 | |
/// </summary> | |
public $type$ $property$ | |
{ | |
get { return _$property$; } | |
set { _$property$ = value; } | |
} | |
$end$]]> | |
</Code> | |
</Snippet> | |
</CodeSnippet> | |
</CodeSnippets> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment