+ 1

What is difference between first() and single() ?? Can you explain with example..

11th May 2017, 2:35 AM
khemraj katkar
2 Answers
+ 5
Single will throw an exception if there's a duplicate element. First just returns the 1st element.
11th May 2017, 3:19 AM
Rrestoring faith
Rrestoring faith - avatar
+ 1
please post the code here
11th May 2017, 3:09 AM
Edward