我有一个模块设置就像一个其他脚本的库.我无法弄清楚如何在脚本范围调用中获取类声明Import-Module.我试着Export-Module用一个-class参数安排,比如-function,但是没有-class可用的.我只需要在每个脚本中声明该类吗?
设置:
import-module holidays这是这个类的样子:
Class data_block
{
$array
$rows
$cols
data_block($a,$r,$c)
{
$this.array = $a
$this.rows = $r
$this.cols = $c
}
}
Run Code Online (Sandbox Code Playgroud)