Beispiel #1
0
        public void OnArrayList()
        {
            BoxTest   bt = new BoxTest();
            ArrayList al = new ArrayList();

            al.Add(1);
            al.Add("123");
            al.Add(333.88f);
            al.Add(bt);
            al.Add("123");
            al.Add("123");
            foreach (var i in al)
            {
                //    Console.WriteLine(GetAddress(i));
            }
            // string s1 = "3";
            // string s2 = "3";
            // string s3 = "3";
            // Console.WriteLine(GetAddress(s1));
            // Console.WriteLine(GetAddress(s2));
            // Console.WriteLine(GetAddress(s3));
            // Console.WriteLine(GetAddress(s1));
            // Console.WriteLine(GetAddress(s2));
            // Console.WriteLine(GetAddress(s3));
            string x1 = "111";
            string x2 = "111";

            Console.WriteLine("x1" + x1.GetHashCode());
            Console.WriteLine("x2" + x2.GetHashCode());

            Console.WriteLine(GetAddress(x1));
            Console.WriteLine(GetAddress(x2));
        }
Beispiel #2
0
        static void MakeBoxing()
        {
            BoxTest bt = new BoxTest();

            bt.OnBox();
        }