Ejemplo n.º 1
0
        private static void ComparisonExample()
        {
            int a = 5;
            int b = 5;

            bool equal = a == b; //yes

            Console.WriteLine(equal);


            a = b;

            b++;

            Console.WriteLine(a);



            BankAccount ba = new BankAccount()
            {
                Id = 1
            };
            BankAccount bb = new BankAccount()
            {
                Id = 1
            };

            equal = ba == bb;

            Console.WriteLine(equal);

            bb = ba;

            equal = ba == bb;
            bb.Id = 5;
            Console.WriteLine(ba.Id);


            a = 5;
            Increment(a);
            Console.WriteLine(a);

            ba.Id = 5;
            Increment(ba);
            Console.WriteLine(ba.Id);


            Console.WriteLine(equal);

            DateTime birthday = new DateTime(1974, 2, 15);

            DateTime birthday2 = new DateTime(1974, 2, 15);

            DateTime b3 = DateTime.Now;

            if (birthday == birthday2)
            {
                Console.WriteLine("same");
            }
            else
            {
                Console.WriteLine("NOT");
            }

            ConsoleColor c1 = ConsoleColor.Blue;

            ConsoleColor c2 = c1;

            c1 = ConsoleColor.Cyan;

            string s  = new string("hi");
            string s2 = "hi";

            int  i   = 5;
            bool bbb = true;

            equal = s == s2;



            Digit d1 = new Digit(5);

            Digit d2 = new Digit(5);

            //Digit d3 = 5;

            //int i3 = d3;

            d1 = d2;

            //Digit[] LIST

            Console.WriteLine(birthday);

            Simo.UI.List l1 = new Simo.UI.List();

            Simo.Collections.List l2 = new Simo.Collections.List();

            SomeClass sc = new SomeClass();
        }
Ejemplo n.º 2
0
 public void Add(Digit d)
 {
 }