Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Animal {
- public void Speak() {
- Console.WriteLine("Животное говорит");
- }
- }
- class Dog : Animal {
- public void Speak() {
- Console.WriteLine("Собака лает");
- }
- }
- class Program_1 {
- static void Main_1() {
- Animal myDog = new Dog();
- myDog.Speak();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement