using System;
Setting.Path = @"C:\tmp\";
Setting.Mode = 3;
Setting.SetNextMode();
//Setting.Mode is 1
Console.WriteLine("{0}, {1}", Setting.Mode, Setting.Path);
struct Setting {
//类型字段
public static string Path;
//类型属性
public static int Mode { get; set; }
//类型方法
public static void SetNextMode() {
Mode = (Mode + 1) % 3;
}
}