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
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for