コード例 #1
0
 public Badges SeeBadgeByID(int id)
 {
     if (_badgeDictionary.ContainsKey(id))
     {
         Badges newBadge = new Badges(id, _badgeDictionary[id]);
         return(newBadge);
     }
     return(null);
 }
コード例 #2
0
        public bool DeleteDoor(int id, string newBadgeDoor)
        {
            Badges oldDoor = SeeBadgeByID(id);

            if (oldDoor != null)
            {
                _badgeDictionary[id].Remove(newBadgeDoor);
                return(true);
            }
            else
            {
                return(false);
            }
        }