Here is my class:
public static class Root
{
private static readonly NestedOne nestedOne;
static Root()
{
nestedOne = new NestedOne();
}
class NestedOne
{
private string FindMe = "blabla";
}
}
I need get that field that called 'FindMe' through the Root. I successfully get the instance of NestedOne:
var nestedOne = typeof(Root).GetField("nestedOne", System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic);
But can't get further:
var fields = nestedOne.GetType().GetFields(BindingFlags.NonPublic); // there is empty
Please help me