Using #pragma statement in Razor View
We have some files with the jQuery vsDoc includes like this for syntax help;
@if (false)
{
<script src="@Url.Content开发者_开发问答("~/Scripts/jquery.validate-vsdoc.js")" type="text/javascript"></script>
}
And it generates some annoying compiler warnings about unreachable code, I would like to wrap that statement with a #prama warning but I cant figure out the syntax in Razor.
Thanks!
@{ #pragma warning disable }
@if (false)
{
<script src="@Url.Content("~/Scripts/jquery.validate-vsdoc.js")" type="text/javascript"> </script>
}
@{ #pragma warning restore }
Works for me
I think this should work...
@{#pragma warning disable}
精彩评论