public static void Main()
obj.objB.objA = new A(){ Valor = "Valor de A" };
string x = Teste.ObterValor(obj, "objB.objA.Valor").ToString();
Console.WriteLine("Achou o valor: " + x);
public static class Teste
public static object ObterValor(object obj, string prop)
string[] props = prop.Split('.');
PropertyInfo pi = obj.GetType().GetProperty(props[0]);
var xObj = pi.GetValue(obj, null);
string auxProp = String.Join(".", props,1, props.Length-1);
return ObterValor(xObj, auxProp);
public string Valor {get;set;}