Wednesday, May 5, 2010

What's wrong with this C# CodeSnippet?

Programmer Question


I've made snippets before but I must be overlooking something really simple; I cannot figure out where the error is in this snippet...



<CodeSnippet Format="1.0.0" xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<Header>
<Title>Throw NotImplementedException()</Title>
<Author>olaffuB</Author>
<Shortcut>nie</Shortcut>
<Description>Quickly add a new NotImplementedException() to code.</Description>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>TODO</ID>
<Default></Default>
</Literal>
</Declarations>
<Code Language="C#">
<![CDATA[throw new NotImplementedException("$TODO$"); // TODO: $TODO$]]>
</Code>
</Snippet>




Basically, when I got to import the snippet, it says that it is "invalid". The file name is "nie.snippet". Thanks!





Find the answer here

No comments:

Post a Comment

LinkWithin

Related Posts with Thumbnails