如何遍历属性

2024-12-27 11:03:17
推荐回答(1个)
回答1:

.GetValue(s)).
foreach (System;, p.Reflection.PropertyInfo p in s.GetType().GetProperties())
{
Console.;Name:{0} Value:{1}.Name, pStudent s=new.WriteLine(