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