哪些C#/ .NET依赖注入框架值得研究?你能说出他们的复杂性和速度.
嗨,我试图像这样声明一个静态枚举:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace Lds.CM.MyApp.Controllers
{
public class MenuBarsController : Controller
{
// Menu Bar enums
public static enum ProfileMenuBarTab { MainProfile, Edit, photoGallery }
public ActionResult cpTopMenuBar(string tabSelected)
{
...
Run Code Online (Sandbox Code Playgroud)
"但我收到以下错误:"修饰符'静态'对此项无效."我知道这很简单,但我似乎无法看到问题.非常感谢!
// OK
struct MyStruct
{
static void Foo() { }
}
// Error
static struct MyStruct
{
}
Run Code Online (Sandbox Code Playgroud)