PowerShell: Cannot find proper .ctor when the .ctor has only one argument of type List<T> [duplicate]
问题 This question already has answers here : How do I call New-Object for a constructor which takes a single array parameter? (2 answers) Closed 2 years ago . It seems that there is a bug in the O-O support in PowerShell . When instantiating an object of a class with a constructor that accepts a List< T > and this is the only parameter , PowerShell cannot find a proper constructor. Code sample: class MyClass { MyClass( #[int]$i, [System.Collections.Generic.List[string]] $theparams) { } }