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