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