随手就写了一个,拿去用用;) 建一个文本文件, 输入以下内容
<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>code description</Title>
<Shortcut>desc</Shortcut>
<Description>Code snippet for Code Description</Description>
<Author>Darkangle</Author>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
<SnippetType>SurroundsWith</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>class_name</ID>
<ToolTip>Class name</ToolTip>
<Default>MyClass</Default>
</Literal>
<Literal>
<ID>created_date</ID>
<ToolTip>created_date</ToolTip>
<Default>2008-1-1</Default>
</Literal>
<Literal>
<ID>author</ID>
<ToolTip>author</ToolTip>
<Default>author</Default>
</Literal>
<Literal>
<ID>description</ID>
<ToolTip>description</ToolTip>
<Default>description</Default>
</Literal>
</Declarations>
<Code Language="csharp"><![CDATA[//--------------------------------------------------------------------------------------------
//Class Name : $class_name$
//Created on : $created_date$
//Prepared By : $author$
//Description : $description$
//--------------------------------------------------------------------------------------------]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>
保存为 codedesc.snippet 并拷到 C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Code Snippets\Visual C