public object?GetNthMask(int index) { RegionSound_FieldIndex enu = (RegionSound_FieldIndex)index; switch (enu) { case RegionSound_FieldIndex.Sound: return(Sound); case RegionSound_FieldIndex.Flags: return(Flags); case RegionSound_FieldIndex.Chance: return(Chance); default: throw new ArgumentException($"Index is out of range: {index}"); } }
public void SetNthMask(int index, object obj) { RegionSound_FieldIndex enu = (RegionSound_FieldIndex)index; switch (enu) { case RegionSound_FieldIndex.Sound: this.Sound = (Exception?)obj; break; case RegionSound_FieldIndex.Flags: this.Flags = (Exception?)obj; break; case RegionSound_FieldIndex.Chance: this.Chance = (Exception?)obj; break; default: throw new ArgumentException($"Index is out of range: {index}"); } }