Difference between single
and find
?
#6107
Answered
by
madebyjeffrey
Sawtaytoes
asked this question in
Q&A
-
I've been going through the docs site trying to understand every operator I don't already know. In one of those instances, I noticed |
Beta Was this translation helpful? Give feedback.
Answered by
madebyjeffrey
Mar 10, 2021
Replies: 1 comment
-
Read the documentation carefully, you will notice that single will throw an error in the event more than one item emitted, while find emits no errors. There are cases where you only want one item and other cases where you must only have one item. In C# LINQ there is also a single and first that has the same kind of difference. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Sawtaytoes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Read the documentation carefully, you will notice that single will throw an error in the event more than one item emitted, while find emits no errors. There are cases where you only want one item and other cases where you must only have one item.
In C# LINQ there is also a single and first that has the same kind of difference.