egameiro
(Eduardo)
1
Hello friends…
I have a specific situation where I need to get the value of an element from an IEnumerable object but without using for each.
I used this command “NumeroDaNota.ElementAtOrDefault(0).Value” but the result was this ==> “Número00001234”
When I use For Each and show the currentItem content it only shows me “00001234”
Is there any way to get the content of the element without using For Each …?
Grateful
Anil_G
(Anil Gorthi)
2
@egameiro
You can directly use like this
Numerodanota.Select(function(x) x.Value)(0)
Cheers
Yoichi
(Yoichi)
3
Hi,
Which type is NumeroDaNota such as IEnumeable<XElement>
etc?
Regards,
system
(system)
Closed
4
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.