why static?
楼主去看MSDN里enum的帮助。
enum UserType{NORMAL,VIP};//能否修改以如何定义静态的UserType
-〉
public enum UserType{NORMAL,VIP};
楼主去看MSDN里enum的帮助。
enum UserType{NORMAL,VIP};//能否修改以如何定义静态的UserType
-〉
public enum UserType{NORMAL,VIP};
namespace xxxx{
...
private void button1_Click_1(object sender, System.EventArgs e)
{
int a = (int) User.UserType.GUARDIAN;
enum Colors { Red, Green, Blue, Yellow };
enum Styles { Plaid, Striped, Tartan, Corduroy }; public static void Main() { Console.WriteLine("The 4th value of the Colors Enum is {0}", Enum.GetName(typeof(Colors), 3));
Console.WriteLine("The 4th value of the Styles Enum is {0}", Enum.GetName(typeof(Styles), 3));
}
}