I have a list that has 4 rows. I need to get the value of the 3rd row.
var result = (from rs in list
select rs).Skip(2).First();
Is there a reason why I would want to use a Take(1) in this scenerio as I have seen used.
var result = (from rs in list
select rs).Skip(2).Take(1);
Take(1)
returns an IEnumerable<T>
containing one object.First()
returns the object directly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With