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