static void Main(string[] args) { Lake Baikal = new Lake("Природное", "Байкал"); Baikal.Depth = 1642; Baikal.Weidth = 79; Baikal.Age = 20; Baikal.Pollution = 20; Console.WriteLine(Baikal); Console.ReadKey(); }
static void Main(string[] args) { var water = new Water(150); var sea = new Sea(150); var lake = new Lake(150); var continent = new Continent(); var state = new State(); Console.WriteLine("Object 'Lake', method 'SomeMethod()': " + lake.SomeMethod() + "\nObject 'Lake' inherited to 'Sea', method 'SomeMethod()': " + ((Sea)lake).SomeMethod()); Water a = new Sea(150); Water b = new Lake(150); Console.Write("\n" + water.GetVolume() + "\n" + a.GetVolume() + "\n" + b.GetVolume() + "\n\n"); Print look = new Print(); Console.WriteLine(look.Prints(water)); Console.WriteLine(look.Prints(continent)); Console.WriteLine(look.Prints(b)); }