Interlocked.Exchange Generic Method (T, T)
Assembly: mscorlib (in mscorlib.dll)
Type Parameters
- T
The type to be used for location1 and value. This type must be a reference type.
Parameters
- location1
The variable to set to the specified value. This is a reference parameter (ref in C#, ByRef in Visual Basic).
- value
The value to which the location1 parameter is set.
Return Value
The original value of location1.This method only supports reference types. There are overloads of the Exchange method for the value types Int32, Int64, IntPtr, Single, and Double, but there is no support for other value types.
Note |
|---|
| This method overload is preferable to the Exchange(Object,Object) method overload, because the latter requires the destination object to be accessed late-bound. |
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.
Note