Skip to content

Instantly share code, notes, and snippets.

@guitarrapc
Last active July 7, 2020 10:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guitarrapc/f44f5454b16cad6a53214d6ffaaf90b1 to your computer and use it in GitHub Desktop.
Save guitarrapc/f44f5454b16cad6a53214d6ffaaf90b1 to your computer and use it in GitHub Desktop.
using namespace System.Collections.Generic
function _f {
$l = New-Object "List[string]"
$l.Add("abc")
return $l
}
$list = _f
$list
# output: abc
#Requires -Version 5
using namespace System.Collections.Generic
function _f {
$l = [List[string]]::New()
$l.Add("abc")
return $l
}
$list = _f
$list
# output: abc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment