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