Server Error in '/' Application.

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0151: A switch expression or case label must be a bool, char, string, integral, enum, or corresponding nullable type in C# 6 and earlier.

Source Error:


Line 6:      var catname = "";
Line 7:      var desc = "";
Line 8:      switch (ViewBag.GroupId)
Line 9:      {
Line 10:         case 1:

Source File: C:\Inetpub\vhosts\sltamgcd.winhost-0111.000web.xyz\cokhithanhdat.com.vn\Views\Home\AllProducts.cshtml    Line: 8






Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4494.0