예제 #1
0
            public static void Main()
            {
                var p1 = new Point(2, 3, "A");
                var p2 = new Point(1, 3, "B");
                var p3 = new Point(2, 3, "A");

                Console.WriteLine(p1 == p2);  // output: False
                Console.WriteLine(p1 == p3);  // output: True

                var n1 = new TaggedNumber(2, new List <string>()
                {
                    "A"
                });
                var n2 = new TaggedNumber(2, new List <string>()
                {
                    "A"
                });

                Console.WriteLine(n1 == n2);  // output: False
            }
 protected TaggedNumber(TaggedNumber original)
 {
     Number = original.Number;
     Tags   = new List <string>(original.Tags);
 }