请教:C#反射GetType().GetProperties()为什么取不到值?

做了一个方法,传入某对象,如果是string类型则后面加个“1”
加断点propertys的值是{System.Reflection.PropertyInfo[0]}
进不到 foreach循环里,请高手看看这是怎么回事啊?
调用代码是:bm = getObject(bm);

public T getObject(T t)

{

string temp = "";

System.Reflection.PropertyInfo[] propertys = t.GetType().GetProperties();

foreach (System.Reflection.PropertyInfo p in propertys)

{

if (p.PropertyType == typeof(string))

{

temp = p.GetValue(t, null).ToString();

p.SetValue(t, temp+"1", null);

}

}

return t;

}

首先确认你的实例中是否有property,就是通过getter或stter访问的

bm是什么类型,它有没有属性,并且属性是否是静态的、私有的?