如何去遍历对象中的所有的属性值
//本函数是使用了反射来实现访问对象的属性值的函数
//using System.Reflection;
private void GetObjectPropertyValue(clsUser user)
{
Type t = user.GetType();
foreach (PropertyInfo pi in t.GetProperties())
{
Response.Write( pi.Name + "---" + pi.GetValue(user,null) + "<br>");
}
}