62,046
社区成员
发帖
与我相关
我的任务
分享
namespace ConsoleApplication5
{
class Program
{
static void Main(string[] args)
{
AA A= new AA() { MyProperty = 1, SSS = "dd", jj = 23 };
PropertyInfo[] pInfos =A.GetType().GetProperties();
foreach (var item in pInfos)
{
Console.WriteLine(item.Name);
}
Console.Read();
}
}
class AA
{
public int MyProperty { get; set; }
public string SSS { get; set; }
public int jj { get; set; }
}
}