反射 - C# Notes

反射

foreach (PropertyInfo prop in typeof(PetInfo).GetProperties())

{

    if (prop.CanRead && prop.CanWrite)

    {

        prop.SetValue(request, prop.GetValue(pet, null), null);

    }

}

result = request;

posted on 2017-08-21 10:07  呼呼net  阅读(90)  评论(0编辑  收藏  举报

导航