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