I have a class as like the following
namespace Foo.Bar
{
public static class ParentClass
{
public const string myValue = "Can get this value";
public static class ChildClass
{
public const string myChildValue = "I want to get this value";
}
}
}
I can get the myValue using powershell,
[System.Reflection.Assembly]::LoadWithPartialName("Foo.Bar")
$parentValue = [Foo.Bar.ParentClass]::myValue
But I'm unable to get the class within the class myChildValue. Can anyone help?
Thought it might be something like below but $childValue is always empty.
[System.Reflection.Assembly]::LoadWithPartialName("Foo.Bar")
$childValue = [Foo.Bar.ParentClass.ChildClass]::myChildValue