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