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