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