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