System.Collections.Stack.Clone C# (CSharp) Method

Clone() public method

public Clone ( ) : Object
return Object
        public virtual Object Clone()
        {
            Contract.Ensures(Contract.Result<Object>() != null);

            Stack s = new Stack(_size);
            s._size = _size;
            Array.Copy(_array, 0, s._array, 0, _size);
            s._version = _version;
            return s;
        }

Same methods

Stack::Clone ( ) : object

Usage Example

 public override object Clone()
 {
     lock (stack)
     {
         return(Stack.Synchronized((Stack)stack.Clone()));
     }
 }
All Usage Examples Of System.Collections.Stack::Clone