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