Estoy tratando de usar Enumerable.ToList()
en PowerShell. Aparentemente, para hacer eso, tengo que convertir explícitamente el objeto a IEnumerable<CustomType>
, pero no puedo hacer eso. Parece que no puedo escribir correctamente IEnumerable<CustomType>
en PowerShell. Tanto IEnumerable<string>
como CustomType
funcionan correctamente (el tipo personalizado que intento usar se llama WpApiLib.Page
), así que no sé qué puedo estar haciendo mal.IEnumerable <CustomType> en 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]] <<<<
ouch, eso es realmente feo, gracias – svick