'namespace' but is used like a 'type'

前端 未结 7 1713
孤独总比滥情好
孤独总比滥情好 2020-11-27 04:35

This is my program the class uses it is called Time2 I have the reference added to TimeTest I keep getting the Error \'Time2\' is a \'namespace\' but is used like a \'type\'

7条回答
  •  被撕碎了的回忆
    2020-11-27 05:26

    namespace TestApplication // Remove .Controller
    {
        public class HomeController : Controller
        {
           public ActionResult Index()
            {
                return View();
            }
        }
    }
    

    Remove the controller word from namepsace

提交回复
热议问题