C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC#\Snippets\1041\Visual C#
にXMLで記述し拡張子「.snippet」として納めると機能する

  • .NET Framework ガイドラインに準拠した匿名関数のコード スニペット dele.snippet
delegate(object sender EventArgs e){};
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
	<Header>
		<Title>dele</Title>
		<Shortcut>dele</Shortcut>
		<Description>.NET Framework ガイドラインに準拠した匿名関数のコード スニペット</Description>
		<Author>Microsoft Corporation</Author>
		<SnippetTypes>
			<SnippetType>Expansion</SnippetType>
			<SnippetType>SurroundsWith</SnippetType>
		</SnippetTypes>
	</Header>
	<Snippet>
		<Declarations>
			<Literal>
				<ID>sender</ID>
				<ToolTip>呼び出し元</ToolTip>
				<Default>sender</Default>
       </Literal>
       <Literal>
         <ID>event</ID>
         <ToolTip>イベント</ToolTip>
         <Default>e</Default>
			</Literal>
		</Declarations>
		<Code Language="csharp"><![CDATA[delegate(object $sender$, EventArgs $event$){$selected$$end$	};]]>
		</Code>
	</Snippet>
</CodeSnippet>
</CodeSnippets>
最終更新:2012年06月21日 11:40