ImmutableInterlocked.InterlockedCompareExchange<T> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Compares two immutable arrays for equality and, if they are equal, replaces one of the arrays.
public:
generic <typename T>
static System::Collections::Immutable::ImmutableArray<T> InterlockedCompareExchange(System::Collections::Immutable::ImmutableArray<T> % location, System::Collections::Immutable::ImmutableArray<T> value, System::Collections::Immutable::ImmutableArray<T> comparand);
public static System.Collections.Immutable.ImmutableArray<T> InterlockedCompareExchange<T> (ref System.Collections.Immutable.ImmutableArray<T> location, System.Collections.Immutable.ImmutableArray<T> value, System.Collections.Immutable.ImmutableArray<T> comparand);
static member InterlockedCompareExchange : ImmutableArray * System.Collections.Immutable.ImmutableArray<'T> * System.Collections.Immutable.ImmutableArray<'T> -> System.Collections.Immutable.ImmutableArray<'T>
Public Shared Function InterlockedCompareExchange(Of T) (ByRef location As ImmutableArray(Of T), value As ImmutableArray(Of T), comparand As ImmutableArray(Of T)) As ImmutableArray(Of T)
Type Parameters
- T
The type of element stored by the array.
Parameters
- location
- ImmutableArray<T>
The destination, whose value is compared with comparand
and possibly replaced.
- value
- ImmutableArray<T>
The value that replaces the destination value if the comparison results in equality.
- comparand
- ImmutableArray<T>
The value that is compared to the value at location
.
Returns
The original value in location
.
Applies to
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET