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