ASP.NET MVC Razor & C# Array - Parser Error -


i have asp.net mvc 4 view have embedded code block, this:

@using system.collections.generic  @{     portfoliooverviewmodel item = @model.items[0];  //configuration     int[] bootstrapgridvalues = new int[]{12, 6, 6, 4, 4, 4};     int devicewidth = 800;  // more code } 

the problem is, closing } of array causing intellisense, , compiler break. instead of closing array, thinks closes whole code block:

@using system.collections.generic  @{     portfoliooverviewmodel item = @model.items[0];  //configuration                    closes whole block  v     int[] bootstrapgridvalues = new int[]{12, 6, 6, 4, 4, 4};     int devicewidth = 800; // not recognized code  // more code } // not recognized closing brace 

why mixing braces? there way can work around this?

note: entire code block. i'm not snipping out code may have forgotten close earlier brace.

remove @ portfoliooverviewmodel item = @model.items[0];

it should following :

portfoliooverviewmodel item = model.items[0];