Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Animals1a
- {
- abstract class Animal : IMakeNoise
- {
- private string name;
- public string Name
- {
- get { return name; }
- set { name = value; }
- }
- public Animal(string name)
- {
- this.name = name;
- }
- public virtual void MakeNoise()
- {
- Console.WriteLine("Grrrrr. My name is {0}", name);
- }
- }
- }
Add Comment
Please, Sign In to add comment