コード例 #1
0
        private static int Main(string[] args)
        {
            XorList xorList = new XorList();

            xorList.Add(10);
            xorList.Add(25);
            xorList.Add(42);

            foreach (int number in xorList)
            {
                Console.WriteLine(number);
            }

            try
            {
                Console.WriteLine(xorList[4]);
            }
            catch (IndexOutOfRangeException e)
            {
                Console.WriteLine(e.Message);
            }

            Console.ReadLine();

            return(0);
        }
コード例 #2
0
 public Node(int data, Node *previous, Node *next)
 {
     this.data       = data;
     this.xorAddress = XorList.XorAddresses(previous, next);
 }