枚举 定义哪里?
public static void Main() {
enum Days : int
{
Sat=1, Sun, Mon, Tue, Wed, Thu, Fri
};
int x = (int) Days.Sun;
int y = (int) Days.Fri;
Console.WriteLine("Sun = {0}", x);
Console.WriteLine("Fri = {0}", y);
}
问 ::枚举应该定义在什么地方?为什么?
望大虾指点~