Last active
August 29, 2015 23:31
-
-
Save guitarrapc/1149232432474369647c to your computer and use it in GitHub Desktop.
You can not use using namespace syntax until v5.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Version under 5.0 | |
function Main | |
{ | |
[OutputType([System.Collections.Generic.List[string]])] | |
[CmdletBinding()] | |
param() | |
$listInt = New-Object System.Collections.Generic.List[int]; | |
$listString = New-Object System.Collections.Generic.List[string]; | |
[System.Linq.Enumerable]::Range(0, 10) | %{ $listInt.Add($_); } | |
$listInt | % { $listString.Add("Item : $_"); } | |
return $listString; | |
} | |
Main; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment