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