Asp.net-mvc – How to use generic syntax inside a Razor view file

asp.net-mvcasp.net-mvc-3razor

I was trying to use the following statement:

@Html.Test<ISQL>().Nand()

However, Razor is choking at the < before the ISQL.

Any official work around for it?

Best Answer

To use generic methods you need to escape the expression

@(Html.Test<ISQL>().Nand())