Should int and string be reversed in your example to accomplish what he wants? Or am I just being dense?
0
You could try (sorry i'm typing from my phone)
class MyClass
{
public int x {get;set;}
MyClass()
{
x = 3;
}
void Foo()
{
Type type = GetType();
PropertyInfo pInfo = type.GetProperty("x");
object xValue= pInfo.GetValue(this, null);
Console.Writeln(xValue);
}
}
Dictionary<string,int>.