<Declarations> <Literal default="true"> <ID>name</ID> <ToolTip>Class name</ToolTip> <Default>MyClass</Default> </Literal> </Declarations> The snippet contains one parameter which is the “Class name”. You can specify as many parameters as you want.
<Code Language="csharp" Format="CData"> <![CDATA[class $name$ { $selected$$end$ }]]> </Code> By looking at the code, you’ll notice three different-looking directives. The $name$, $selected$ and $end$. The $name$ directive is the ID of the parameter that you declared in the <Declarations> tag. This will tell the IDE that this is the place where the user must specify a value. The $selected$ directive represents the code that was selected prior to the insertion of the code snippet. This is pretty useful if your snippet will supports “SurroundsWith”. Lastly the $end$ directive is where your cursor would be located after the insertion of the code snippet.
Be the first to rate this post
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.
© Copyright 2008