,System.IObservable{--0})} ,System.IObservable{--0},System.Collections.Generic.IEqualityComparer{--0})} ,System.Collections.Generic.IEnumerable{--0})} ,System.Collections.Generic.IEnumerable{--0},System.Collections.Generic.IEqualityComparer{--0})}
Observable.SequenceEqual(IObservable, IObservable) method¶
Defined in
Type: Observable
Namespace: System.Reactive.Linq
Assembly: System.Reactive.dll
Applies to
netstandard2.0
Overloads¶
- 1.
public static IObservable<bool> SequenceEqual<TSource>(this IObservable<TSource> first, IObservable<TSource> second) - 2.
public static IObservable<bool> SequenceEqual<TSource>(this IObservable<TSource> first, IObservable<TSource> second, IEqualityComparer<TSource> comparer) - 3.
public static IObservable<bool> SequenceEqual<TSource>(this IObservable<TSource> first, IEnumerable<TSource> second) - 4.
public static IObservable<bool> SequenceEqual<TSource>(this IObservable<TSource> first, IEnumerable<TSource> second, IEqualityComparer<TSource> comparer)
1. Overload¶
public static IObservable<bool> SequenceEqual<TSource>(this IObservable<TSource> first, IObservable<TSource> second)
Summary: Determines whether two sequences are equal by comparing the elements pairwise.
Type parameters
| Name | Description |
|---|---|
TSource | The type of the elements in the source sequence. |
Parameters
| Name | Type | Description |
|---|---|---|
first | IObservable | First observable sequence to compare. |
second | IObservable | Second observable sequence to compare. |
Returns: IObservable
Remarks
The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | first or second is null. |
2. Overload¶
public static IObservable<bool> SequenceEqual<TSource>(this IObservable<TSource> first, IObservable<TSource> second, IEqualityComparer<TSource> comparer)
Summary: Determines whether two sequences are equal by comparing the elements pairwise using a specified equality comparer.
Type parameters
| Name | Description |
|---|---|
TSource | The type of the elements in the source sequence. |
Parameters
| Name | Type | Description |
|---|---|---|
first | IObservable | First observable sequence to compare. |
second | IObservable | Second observable sequence to compare. |
comparer | IEqualityComparer | Comparer used to compare elements of both sequences. |
Returns: IObservable
Remarks
The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | first or second or comparer is null. |
3. Overload¶
public static IObservable<bool> SequenceEqual<TSource>(this IObservable<TSource> first, IEnumerable<TSource> second)
Summary: Determines whether an observable and enumerable sequence are equal by comparing the elements pairwise.
Type parameters
| Name | Description |
|---|---|
TSource | The type of the elements in the source sequence. |
Parameters
| Name | Type | Description |
|---|---|---|
first | IObservable | First observable sequence to compare. |
second | IEnumerable | Second observable sequence to compare. |
Returns: IObservable
Remarks
The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | first or second is null. |
4. Overload¶
public static IObservable<bool> SequenceEqual<TSource>(this IObservable<TSource> first, IEnumerable<TSource> second, IEqualityComparer<TSource> comparer)
Summary: Determines whether an observable and enumerable sequence are equal by comparing the elements pairwise using a specified equality comparer.
Type parameters
| Name | Description |
|---|---|
TSource | The type of the elements in the source sequence. |
Parameters
| Name | Type | Description |
|---|---|---|
first | IObservable | First observable sequence to compare. |
second | IEnumerable | Second observable sequence to compare. |
comparer | IEqualityComparer | Comparer used to compare elements of both sequences. |
Returns: IObservable
Remarks
The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | first or second or comparer is null. |