First of enumerable

9 views
Skip to first unread message

Gloops

unread,
Jul 17, 2018, 5:39:17 PM7/17/18
to
Hello everybody,

Somewhere on Stackoverflow, I saw it was possible to get the first
element of an enumerable, like this :

[Linq.Enumerable]::First($list)

Well, I get the list of processes like this :
$p = Get-WmiObject Win32_Process

but if I type
[Linq.Enumerable]::First($p)

I get an error, something like "unfound override for "First" and the
number of arguments "1"
(I hope I translate properly)

Well, I presume I should cast the object ?

Reply all
Reply to author
Forward
0 new messages