use reflections, for exampleusing System.Reflection;Type t = typeof(YourClass);
foreach (PropertyInfo pi in t.GetProperties())
{
   Response.Write(pi.Name);
}

解决方案 »

  1.   

    同意: saucer(思归) 
    通过反射来遍历属性和方法!
      

  2.   

    哦?反射命名空间?
    MSDN里面的看步太懂,能否通俗点解释一下它的作用?
    另外,我没用过using这种用法,与imports有什么区别?
      

  3.   

    that is C#, for vb, try
    Imports System.Reflectiondim t as Type = GetType(YourClass)
    dim pi as PropertyInfo
    for each (pi in t.GetProperties())
       Response.Write(pi.Name)
    next
      

  4.   

    思归大哥说的很对了啊
    不过,我也有个问题
    http://expert.csdn.net/Expert/topic/2457/2457370.xml?temp=.5985376
      

  5.   

     && learning......hoho