Type t = p.GetType();foreach(PropertyInfo info in t.GetProperties()){if(info.Name== propName && info.CanWrite){ info.SetValue(p, value,null);}}