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