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