• 一个双链表节点的类


    一个双链表节点的类,还比较常用,记录一下。

    class DoubleLinkedNode<T>
    {
        public DoubleLinkedNode(T value)
        {
            this.Value = value;
        }

        public T Value { get; set; }

        DoubleLinkedNode<T> next;
        public DoubleLinkedNode<T> Next
        {
            get { return next; }
            set
            {
                next = value;
                if (next != null)
                    next.previous = this;
            }
        }

        DoubleLinkedNode<T> previous;
        public DoubleLinkedNode<T> Previous
        {
            get { return previous; }
            set
            {
                previous = value;
                if (previous != null)
                    previous.next = this;
            }
        }

        public override string ToString()
        {
            return Value.ToString();
        }
    }

  • 相关阅读:
    Mono 1.1.16
    Minimum Profit 3.3.18a
    PenguinTV 1.90
    Beagle 0.2.7
    Bonfire 0.4.0
    wxDownload Fast 0.4.5
    Network Configurator 0.1.8
    VMware Server 1.0
    MonoDevelop 0.11
    GTKsopcast 0.2.8
  • 原文地址:https://www.cnblogs.com/TianFang/p/1227247.html
Copyright © 2020-2023  润新知