Beispiel #1
0
        static void Main()
        {
            WriteLine("***** Fun with Object Context *****\n");

            // Objects will display contextual info upon creation.
            _ = new SportsCar();
            WriteLine();
            _ = new SportsCar();
            WriteLine();
            _ = new SportsCarThreadSafe();
            ReadLine();
        }
        static void Main(string[] args) {

            SportsCar sport1 = new SportsCar();
            Console.WriteLine();

            SportsCar sport2 = new SportsCar();
            Console.WriteLine();

            SportsCarTS synchroSport = new SportsCarTS();


            Console.ReadLine();
        }
Beispiel #3
0
        static void Main(string[] args)
        {
            Console.WriteLine("***** Fun with Object Context *****\n");

            // Objects will display contextual info upon creation.
            SportsCar sport = new SportsCar();
            Console.WriteLine();

            SportsCar sport2 = new SportsCar();
            Console.WriteLine();

            SportsCarTS synchroSport = new SportsCarTS();
            Console.ReadLine();
        }
Beispiel #4
0
        static void Main(string[] args)
        {
            Console.WriteLine($"**** Fun with Object Context ****");

            //Objects will display contextual info upon creation
            SportsCar sport = new SportsCar();

            Console.WriteLine();

            SportsCar sport2 = new SportsCar();

            Console.WriteLine();
            SportsCarTS synchroSport = new SportsCarTS();
        }
Beispiel #5
0
        static void Main(string[] args)
        {
            SportsCar sportsCar = new SportsCar();

            Console.WriteLine();

            SportsCar sportBus = new SportsCar();

            Console.WriteLine();

            SportsCarTS sychroSport = new SportsCarTS();

            Console.ReadLine();
        }
Beispiel #6
0
        static void Main(string[] args)
        {
            Console.WriteLine("**** Fun with object context ****");
            SportsCar car1 = new SportsCar();

            Console.WriteLine();

            SportsCar car2 = new SportsCar();

            Console.WriteLine();

            SportsCarTS car3 = new SportsCarTS();

            Console.ReadLine();
        }
Beispiel #7
0
        private static void Main()
        {
            var sport = new SportsCar();

            Console.WriteLine(sport);

            var sport2 = new SportsCar();

            Console.WriteLine(sport2);

            var syncSport = new SportsCarThreadSafety();

            Console.WriteLine(syncSport);

            Console.ReadKey(true);
        }
Beispiel #8
0
        static void Main(string[] args)
        {
            Console.WriteLine("***** Fun with Object Context *****\n");

            //  对象将显示创建时的上下文信息
            SportsCar sport = new SportsCar();

            Console.WriteLine();

            SportsCar sport2 = new SportsCar();

            Console.WriteLine();

            SportsCarTS synchroSport = new SportsCarTS();

            Console.ReadLine();
        }
Beispiel #9
0
        private static void ObjectContext()
        {
            Console.ForegroundColor = ConsoleColor.Yellow;
            Console.WriteLine("=> Object Context");

            SportsCar car1 = new SportsCar();

            Console.WriteLine();

            SportsCar car2 = new SportsCar();

            Console.WriteLine();

            SportsCarTS syncCar = new SportsCarTS();

            Console.WriteLine();
        }
Beispiel #10
0
        static void Main(string[] args)
        {
            Console.WriteLine("****** Fun with Object Context *****\n");

            // Объекты при создании будут отображать контекстную информацию
            SportsCar sport = new SportsCar();

            Console.WriteLine();

            SportsCar sport2 = new SportsCar();

            Console.WriteLine();

            SportsCarTS synchroSport = new SportsCarTS();

            Console.ReadLine();
        }
        static void Main(string[] args)
        {
            Console.WriteLine("*****fun with object context******\n");

            SportsCar sport = new SportsCar();

            Console.WriteLine();

            SportsCar sport2 = new SportsCar();

            Console.WriteLine();

            SportsCarTS synchroSport = new SportsCarTS();

            Console.WriteLine();

            Console.Read();
        }