$sA=@'
public class A {
public string s1;
public class B {
public string s2;
}
}
'@
Add-Type-TypeDefinition$sA-IgnoreWarnings
$A=New-Object
A
$A.s1='aaaaaa';Write-Host$A.s1
Write-Host (Get-Member-InputObject$A)# Nothing about B
# and this is error
$A.B.s2='cccccc';Write-Host$A.B.s2
This doesn’t work, but, I hope, shows what I want to do. How to make it working?
Thanks, Vilmos