PowerShell converts values returned from function. How to avoid this?

前端 未结 4 1433
没有蜡笔的小新
没有蜡笔的小新 2021-01-13 06:59

I am trying to return List< T> from PowerShell function, but get one of:

  1. null - for empty list
  2. System.Int32 - for list with one element
  3. Sy
4条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-13 07:12

    Note that most of the time, you want Powershell to unroll enumerable types so that piped commands execute faster and with earlier user feedback, since commands down the pipe can start processing the first items and give output.

提交回复
热议问题