//create public bool NewBadge(Badges newBadge) { int startingcount = _dictionaryOfBadges.Count(); _dictionaryOfBadges.Add(newBadge.BadgeID, newBadge.doorAccess); bool wasAdded = (_dictionaryOfBadges.Count() > startingcount) ? true : false; return(wasAdded); }
public bool AccessDoor(Badges newBadge) { int startingcount = _dictionaryOfBadges.Count; int id = newBadge.BadgeID; List <string> listOfDoors = newBadge.doorAccess; _dictionaryOfBadges.Add(id, listOfDoors); bool wasAdded = (_dictionaryOfBadges.Count > startingcount) ? true : false; return(wasAdded); }