Structures type members in C#
Forums:
struct Setting {
//type field
static public string Path;
//type property
static public int Mode { get; set; }
//type method
static public void SetNextMode() {
Mode = (Mode + 1) % 3;
}
}
Setting.Mode = 3;
Setting.SetNextMode();
//Setting.Mode is 1
- Log in to post comments