Beispiel #1
0
        public static int CountAnimalsByType(AnimalSpeciesType animalType)
        {
            var querySelectedAnimals =
                from animal in animalsDB
                where animal.Type == animalType
                select animal;

            return(querySelectedAnimals.Count());
        }
Beispiel #2
0
 public Animal(
     long animalID, AnimalSpeciesType type, Gender gender,
     int age, FoodType foodType,
     decimal price,
     long cageID, HabitatType habitat,
     HealthStatus healthStatus)
     : this(animalID)
 {
     this.Type         = type;
     this.Gender       = gender;
     this.Age          = age;
     this.FoodType     = foodType;
     this.Price        = price;
     this.CageID       = cageID;
     this.Habitat      = habitat;
     this.HealthStatus = healthStatus;
 }
Beispiel #3
0
 public Flying(long animalID, AnimalSpeciesType type, Gender gender, int age, FoodType foodType,
               decimal price, long cageID, HabitatType habitat, HealthStatus healthStatus)
     : base(animalID, type, gender, age, foodType, price, cageID, habitat, healthStatus)
 {
 }