1
한 클래스에서 다른 클래스에 액세스 할 수 없습니다. 클래스는 다른 파일에 정의됩니다. 답변으로모듈 외부에서 모듈에 정의 된 클래스에 액세스하는 방법?
#foo.ps1
Class Foo { static [string]$data }
#bar.ps1
using module ".\foo.ps1"
class Bar {
Bar() {
[Foo]::data="test" #not working
}
}
[Foo]::data="test" #works
'foo.ps1' ->'foo.psm1' – PetSerAl
PetSerAl : 고맙습니다. –