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