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