public Magazine(int id, string magazineCollection, int editionNumber, DateTime releaseYear, StorageBox boxStored) { if (!isValidStorageBox(boxStored)) { throw new ArgumentException("Friend property cannot be set instantiated as a null value."); } if (!IsValidDateTime(releaseYear)) { throw new ArgumentException("ReleaseYear property cannot be set as a date from the future."); } this.id = id; this.magazineCollection = magazineCollection; this.editionNumber = editionNumber; this.releaseYear = releaseYear; this.boxStored = boxStored; }
private bool isValidStorageBox(StorageBox box) { return(box != null); }