如何遍历类的属性? using System.Reflection; Type t = typeof(YourClass); foreach (PropertyInfo pi in t.GetProperties()) { Response.Write(pi.Name); }