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