c# - Why does R# warn me about a commented-out line in CSHTML? -
r# tells me "possible 'system.nullreferenceexception'" on line commented out:
// report_params = { guid: @model.guid, serialnumber: @model.serialnumber, reportname: @model.reportname }; the light bulb "agent" has options "check if model not null" , "assert model not null"
why resharper examine commented-out code? yet, following live code, gets unscathed:
report_params = { guid: "@model.guid", serialnumber: "@model.serialnumber", reportname: "@model.reportname" }; although quotes around vals wrong me.
update
r# telling me, "unknown css class 'staticlabel'" line of html:
<label for="begindate" class="staticlabel">begin date</label> ...when have, in same .cshtml file, in section:
.staticlabel { display: inline-block; width: 140px; margin-right: 2px; text-align: right; font-family: consolas, candara, sans-serif; font-weight: bold; color: brown; } (it's not complaining other classes there supposedly being unknown)
update 2
i had "unmatched closing tag" ( duplicated, rogue rapscallion hidden way out @ line 486).
in asp.net mvc razor view comment tags @* code *@. // not comment out line in razor.
Comments
Post a Comment