facebook twitter hatena line email

「Windows/powershell/クラス」の版間の差分

提供: 初心者エンジニアの簡易メモ
移動: 案内検索
(ページの作成:「==サンプル== hello.ps1 <pre> class HelloClass { [string] hello() { return "Hello!!" } } $helloObj = New-Object HelloClass $helloObj.hello() </pre>」)
(相違点なし)

2021年8月23日 (月) 16:07時点における版

サンプル

hello.ps1

class HelloClass {
    [string] hello() {
        return "Hello!!"
    }
}
$helloObj = New-Object HelloClass
$helloObj.hello()