static void Main(string[] args) { //Earth a = new Earth(); //Earth b = new Earth(); /*Continent continent = new Continent(); * Console.WriteLine(continent.ToString());*/ /*State a = new State(); * IFlight state = new State() * { * Time = "right now" * }; * state = a as IFlight;*/ /*IFlight flight = new State * { * Time = "right now" * }; * Console.WriteLine("Flight to " + flight.To() + " " + flight.Time); * ISailing sailing = new State * { * Time = "tomorrow" * }; * Console.WriteLine("Sailing to " + sailing.To() + " " + sailing.Time);*/ /*IFlight flight = new State * { * Time = "Right now" * }; * Console.WriteLine("Flight to " + flight.To() + " " + flight.Time);*/ //Water b = new Water(); //Continent c = new Continent(); //Island d = new Island(); //Console.WriteLine(a.ToString()); //Console.WriteLine(a.Equals(b)); //Console.WriteLine(a.GetHashCode()); //Console.WriteLine(b.GetHashCode()); //Console.WriteLine(a.GetType()); State state = new State(); Sea sea = new Sea(); Printer printer = new Printer(); IFlight[] flights = { state, sea }; for (int i = 0; i < 2; i++) { printer.IAmPrinting(flights[i]); } Console.ReadLine(); }
static void Main(string[] args) { /*Console.WriteLine("Enum.two = " + Enum.two); * Console.WriteLine("(int)Enum.two = " + (int)Enum.two); * Console.ReadLine(); * Console.Clear(); * * User user = new User { name = "Egor", age = 18 }; * user.DisplayInfo(); * Console.ReadLine(); * Console.Clear();*/ Container container = new Container(); Controller controller = new Controller(); State belarus = new State(); State brazil = new State(); Sea sea1 = new Sea(); Sea sea2 = new Sea(); Island one = new Island(); Island two = new Island(); Island three = new Island(); Console.WriteLine(); container.Add = belarus; container.Add = brazil; container.Add = sea1; container.Add = sea2; container.Add = one; container.Add = two; container.Add = three; controller.Task(container, "evrasia"); Console.ReadLine(); }