asp.net mvc 3 - Razor reseverd words -
that razor syntax neat, there's little arguing about. can't seem find anywhere...
razor reserved words?
@using
@inherits
@functions
@section
know other?
here's list of razor reserved keywords (note: applies cshtml, vbhtml follows vb's rules):
razor-specific keywords
- inherits
- functions
- section
- helper
- model (only in mvc projects)
you can escape these using @(inherits)
language-specific razor keywords
these c# keywords understood razor
- if
- do
- try
- for
- foreach
- while
- switch
- lock
- using
- case
- default
you can escape them using @(@lock) (first @ used escape razor parser , second @ used escape c# parser)
reserved keywords
these not reserved in rc rtm. update: these have no functionality rtm. reserved future use.
- namespace
- class
- layout
Comments
Post a Comment