StackOverflow 文件 PowerShell 教程 PowerShell 類 建構函式過載 建構函式過載 Created: November-22, 2018 class Person { [string] $Name [int] $Age Person([string] $Name) { $this.Name = $Name } Person([string] $Name, [int]$Age) { $this.Name = $Name $this.Age = $Age } } 獲取例項的所有成員方法和屬性