Skip to content

Instantly share code, notes, and snippets.

@marcind
Last active August 29, 2015 14:13
Show Gist options
  • Save marcind/420edc1b3953b82ec45a to your computer and use it in GitHub Desktop.
Save marcind/420edc1b3953b82ec45a to your computer and use it in GitHub Desktop.
Visual Studio code snippet for #pragma warning disable
<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>#pragma</Title>
<Shortcut>#pragma</Shortcut>
<Description>Code snippet for #pragma warning snippet</Description>
<Author>Marcin Dobosz</Author>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
<SnippetType>SurroundsWith</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>warningList</ID>
<ToolTip>Comma-separated list of warning numbers</ToolTip>
<Default>612</Default>
</Literal>
</Declarations>
<Code Language="csharp"><![CDATA[#pragma warning disable $warningList$
$selected$$end$
#pragma warning restore $warningList$]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment