Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- interface IAnimal
- {
- string Name { get; set; }
- int CalculateSomeValue();
- }
- class Dog : IAnimal
- {
- public int weight;
- public string Name { get; set; }
- public int CalculateSomeValue()
- {
- return weight;
- }
- }
- class Cat : IAnimal
- {
- public int bloodPressure;
- public string Name { get; set; }
- public int CalculateSomeValue()
- {
- return bloodPressure;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement