示例#1
0
        public int CompareTo(VectorList <T> rhs)
        {
            if (rhs == null)
            {
                return(1);
            }

            return(1);
        }
示例#2
0
        public bool Equals(VectorList <T> rhs)
        {
            if (object.ReferenceEquals(rhs, null)) // Equals must return false if rhs==null
            {
                return(false);
            }

            // TODO: implement
            return(false);
        }
示例#3
0
        public void Swap(VectorList <T> rhs)
        {
            // Note: This implementation is not exception safe. Without access to internals, it may
            //       be impossible to implement this in a correct manner. Fortunately, the only way this
            //       could fail, I think, is an out of memory situation.
            VectorList <T> temp = new VectorList <T>(this);

            Clear();
            Capacity = rhs.Count;
            AddRange(rhs);
            rhs.Clear();
            rhs.Capacity = temp.Count;
            rhs.AddRange(temp);
        }