Compartilhar via


swap (STL/CLR)

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at swap (STL/CLR).

Exchanges the values of the elements between two types of objects, assigning the contents of the first object to the second object and the contents of the second to the first.

Syntax

<class _Ty> inline  
    void swap(_Ty% _Left, _Ty% _Right);  

Remarks

This function behaves the same as the STL function swap. For more information, see swap.

Requirements

Header: <cliext/algorithm>

Namespace: cliext

See Also

algorithm (STL/CLR)