System.Collections.SortedList.Clone C# (CSharp) Méthode

Clone() public méthode

public Clone ( ) : Object
Résultat Object
        public virtual Object Clone()
        {
            SortedList sl = new SortedList(_size);
            Array.Copy(_keys, 0, sl._keys, 0, _size);
            Array.Copy(_values, 0, sl._values, 0, _size);
            sl._size = _size;
            sl._version = _version;
            sl._comparer = _comparer;
            // Don't copy keyList nor valueList.
            return sl;
        }

Same methods

SortedList::Clone ( ) : object

Usage Example

            // ICloneable

            public override object Clone()
            {
                lock (host.SyncRoot)
                {
                    return(host.Clone() as SortedList);
                }
            }
All Usage Examples Of System.Collections.SortedList::Clone