ERROR: “System.Web.Mvc.Controller.File(string, string, string)”是一个“方法”

ERROR: “System.Web.Mvc.Controller.File(string, string, string)”是一个“方法”,这在给定的上下文中无效

 

这是一个与Controller.File方法和System.IO.File类名称冲突的问题,只要完整输入明确类名就可解决。

比如:File.ReadAllText(file);   》改为》  System.IO.File.ReadAllText(file);

转载自:http://www.cnblogs.com/craig/archive/2010/01/29/1659456.html#undefined

posted @ 2016-06-06 17:29  shuai7boy  阅读(390)  评论(0编辑  收藏  举报