I have one class with default value for Status Message:
class DeploymentState {
[string] $StatusMessage
DeploymentState() {
$this.StatusMessage = "initial status."
}
}
I have Second Class which references the first one:
class Component {
[DeploymentState] $dstate
}
$c=[Component]::new()
$c.dstate.StatusMessage
I am not getting anything as output for this? Help - what I am missing? Even if I instantiate the class the result is the same:
$dstate=[DeploymentState]::new()
$c.dstate.StatusMessage
Thanks