私はVS2010のC#コード用に小さなカスタムスニペットを作成しようとしています。基本的には情報提供の目的でコメントブロックを挿入します。このコード内では、スニペットが挿入されたときに現在の日付が自動的に挿入されます。DateTime.Nowのカスタムスニペット
<CodeSnippet Format="1.0.0">
<Header>
<Title>
C# Class Comments
</Title>
<Shortcut>ccom</Shortcut>
</Header>
<Snippet>
<Declarations>
<Object>
<ID>DateTime</ID>
<Type>System.DateTime</Type>
<Function>DateTime.Now()</Function>
</Object>
<Literal>
<ID>Author</ID>
<ToolTip>Replace with name creator of class.</ToolTip>
<Default>"Author name"</Default>
</Literal>
<Literal>
<ID>Date</ID>
<ToolTip>Replace with date class was created</ToolTip>
<Default>"Date"</Default>
</Literal>
<Literal>
<ID>Modified</ID>
<ToolTip>Replace with modified date of class</ToolTip>
<Default>"Modified"</Default>
</Literal>
<Literal>
<ID>Description</ID>
<ToolTip>Replace with a short description of what the class is used for</ToolTip>
<Default>"Description"</Default>
</Literal>
</Declarations>
<Code Language="CSharp">
<![CDATA[
//*******************************************************************************;
// Author: $Author$
// Created Date: $DateTime$
// Modified Date: $Modified$
// Description: $Description$
//*******************************************************************************;
]]>
</Code>
</Snippet>
</CodeSnippet>
私はスニペットをコードに挿入された日付を挿入するために行うには何がありますか:ここでは
は、私が持っている現在のスニペットのですか?
これは不可能です。代わりにマクロが必要です。 –