4 ms·
There is a slight better trick. If you specify the variable as an array, it will always be treated as such. For example, instead of return $mylist ...you
by electricEmu 9y ago
There is a slight better trick. If you specify the variable as an array, it will always be treated as such.
For example, instead of
return $mylist
...you can...
return @($mylist)
The return keyword is unnecessary in PowerShell so this can be shortened to:
@(mylist)