Sto cercando di utilizzare Enumerable.ToList()
in PowerShell. Apparentemente, per farlo, devo convertire esplicitamente l'oggetto in IEnumerable<CustomType>
, ma non riesco a farlo. Sembra che non riesca a scrivere correttamente IEnumerable<CustomType>
in PowerShell. Entrambi IEnumerable<string>
e CustomType
funzionano correttamente (il tipo personalizzato che sto tentando di utilizzare si chiama WpApiLib.Page
), quindi non so cosa posso fare.IEnumerable <CustomType> in PowerShell
PS C:\Users\Svick> [Collections.Generic.IEnumerable``1[System.String]]
IsPublic IsSerial Name BaseType
-------- -------- ---- --------
True False IEnumerable`1
PS C:\Users\Svick> [WpApiLib.Page]
IsPublic IsSerial Name BaseType
-------- -------- ---- --------
True True Page System.Object
PS C:\Users\Svick> [Collections.Generic.IEnumerable``1[WpApiLib.Page]]
Unable to find type [Collections.Generic.IEnumerable`1[WpApiLib.Page]]: make su
re that the assembly containing this type is loaded.
At line:1 char:51
+ [Collections.Generic.IEnumerable``1[WpApiLib.Page]] <<<<
ahi, è davvero brutto, grazie – svick