DrAske
asked on
Reflection - URGENT
Hi experts ..
I have the following class:
public class ClassA
{
private class ClassB
{
public string property;
}
private IDictionary<string, ClassB> dictionary;
}
How to use reflection to get *property* value of one of the keys in *dictionary* field??
I am getting *dictionary* field as follow:
BindingFlags bindFlags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic;
FieldInfo field = Typeof(ClassA).GetField("d ictionary" , bindFlags);
feld.GetValue(instance);
but I cannot get value of the dictionary since ClassB is private!!
I have the following class:
public class ClassA
{
private class ClassB
{
public string property;
}
private IDictionary<string, ClassB> dictionary;
}
How to use reflection to get *property* value of one of the keys in *dictionary* field??
I am getting *dictionary* field as follow:
BindingFlags bindFlags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic;
FieldInfo field = Typeof(ClassA).GetField("d
feld.GetValue(instance);
but I cannot get value of the dictionary since ClassB is private!!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER