public static void Do() { CatSec c1 = new CatSec("Tom"); c1.Add(new RatSec("A", c1)); c1.Add(new RatSec("B", c1)); c1.Add(new BirdSec("C", c1)); c1.Shout(); Console.ReadLine(); }
public RatSec(string name, CatSec cat) { this.Name = name; this.myCat = cat; }