Both mvcaction3 and mvcaction4 code snippets generate the same action method code as below. What is the difference between them. I am referring to the short cut mvcaction3 then double tab.

public ActionResult Action()
{
    return View();
}

Am I missing something?

Press Ctrl+Space, snippets appear. Select mvcaction3 or mvcaction4 - tab+tab -action method generated. Both the same.

有帮助吗?

解决方案

Go to Add-New Project-Web. You will see MVC3 and MVC4 projects. Each MVC framework brings its snippets. It just happens that they produce the same result.

其他提示

These snippets are stored in a file like:

C:\Program Files\Microsoft ASP.NET\ASP.NET MVC 4\Visual Studio 2012\Snippets\VC#\1033\ASP.NET MVC 4\mvcaction.snippet for MVC4 and

C:\Program Files\Microsoft ASP.NET\ASP.NET MVC 3\Visual Studio 2012\Snippets\VC#\1033\ASP.NET MVC 3\mvcaction.snippet for MVC3.

These can be modified(if you want to). But by default they both are the same.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top