Skip to content

Instantly share code, notes, and snippets.

@guitarrapc
Created September 4, 2015 15:34
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/a20e912687a40ab48c82 to your computer and use it in GitHub Desktop.
Save guitarrapc/a20e912687a40ab48c82 to your computer and use it in GitHub Desktop.
華麗なるクソ回避
using namespace System.Collections.Generic;
function Hoge
{
[OutputType([List[string]])]
[CmdletBinding()]
param()
$list = New-Object List[string];
$list.Add("a");
return $list;
}
@(Hoge).GetType().FullName # System.Object[]
function Fuga
{
[OutputType([List[string]])]
[CmdletBinding()]
param()
$array = [string[]]("a")
return $array
}
@(Fuga).GetType().FullName # System.Object[]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment