If the array consists only of [Thing]'s, you can explicitly cast to a more specific collection type that implements [IEnumerable[Thing]]:$list = [List[Thing]]::new([Thing[]]@( $someObject )) 这篇关于似乎无法将泛型集合与 PowerShell 类一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-23 17:29