public static void main_Linked_D()
        {
            for (int i = 0; i < 4; i++)
            {
                AddLast_D(i * 10);
            }
            for (int i = 0; i < 4; i++)
            {
                AddFirst_D(i * 10);
            }
            Traver_D();
            int    x = 0;
            Node_D q = Find_D(0);

            q.show();
            x = 30;
            Remove_D(x);
            Console.WriteLine("Day sau khi xoa phan tu {0}", x);
            Traver_D();
            x = 20;
            RemoveAll_D(x);
            Console.WriteLine("Day sau khi xoa toan bo phan tu {0}", x);
            Traver_D();
            Clear_D();
            Traver_D();
            Console.ReadKey();
        }
 //Xóa một phần từ ở cuối danh sách đôi LL,RL
 static void DeleteLast_D()
 {
     if (RL != null)
     {
         RL      = RL.Lptr;
         RL.Rptr = null;
     }
 }
 //Xóa một phần tử ở đầu danh sách đôi LL,RL
 static void DeleteFirst_D()
 {
     if (LL != null)
     {
         LL      = LL.Rptr;
         LL.Lptr = null;
     }
 }
        //Duyệt in ra toàn bộ danh sách đôi LL,RL
        static void Traver_D()
        {
            if (LL == null)
            {
                Console.WriteLine("Danh sach rong");
                return;
            }
            Node_D Sq = LL;//tạo 1 con trỏ trung gian duyện danh sách SL

            while (Sq != null)
            {
                Console.WriteLine("Info : {0}", Sq.Info);
                Sq = Sq.Rptr;
            }
        }
 //Tìm phần từ chứa giá trị x trong danh sách đôi SL không thì trả về null
 static Node_D Find_D(int x)
 {
     if (LL != null)
     {
         Node_D Sq = LL, Sp = RL;
         while (Sq != null)
         {
             if (Sq.Info == x)
             {
                 break;
             }
             Sq = Sq.Rptr;
         }
         return(Sq);
     }
     return(null);
 }
        //Bổ xung một phần tử vào cuối danh sách đôi LL,RL
        static void AddLast_D(int x)
        {
            Node_D Sq = new Node_D();

            Sq.Info = x;
            if (RL == null)        //danh sách rỗng thì gán RL,LL trỏ tới Sq
            {
                LL = Sq;
                RL = Sq;
            }
            else
            {
                Sq.Lptr = RL;       //Sq nối với RL
                RL.Rptr = Sq;
                RL      = Sq;       //Thay đổi RL
            }
        }
        //Bổ xung một phần tử vào đầu danh sách đôi LL,RL
        static void AddFirst_D(int x)
        {
            Node_D Sq = new Node_D();

            Sq.Info = x;
            if (LL == null)        //danh sách rỗng thì gán RL,LL trỏ tới Sq
            {
                LL = Sq;
                RL = Sq;
            }
            else
            {
                Sq.Rptr = LL;       //Sq nối với LL cũ
                LL.Lptr = Sq;
                LL      = Sq;       //Thay đổi LL
            }
        }
        //Xóa phần từ chứa giá trị x trong danh sách đôi
        static void Remove_D(int x)
        {
            Node_D temp = Find_D(x);

            if (temp != null)
            {
                if (temp == LL)
                {
                    DeleteFirst_D();
                }
                else
                if (temp == RL)
                {
                    DeleteLast_D();
                }
                else
                {
                    temp.Lptr.Rptr = temp.Rptr;
                    temp.Rptr.Lptr = temp.Lptr;
                }
            }
        }
 //Xóa toàn bộ phẩn tự chứa giá trị x trong danh sách đôi
 static void RemoveAll_D(int x)
 {
     if (LL != null)
     {
         while (LL.Info == x)
         {
             DeleteFirst_D();
         }
         while (RL.Info == x)
         {
             DeleteLast_D();
         }
         Node_D temp = LL;
         while (temp != null)
         {
             if (temp.Info == x)
             {
                 temp.Lptr.Rptr = temp.Rptr;
                 temp.Rptr.Lptr = temp.Lptr;
             }
             temp = temp.Rptr;
         }
     }
 }
 //Xóa toàn bộ danh sách đơn
 static void Clear_D()
 {
     LL = null;
     RL = null;
 }