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