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