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