Commit 7afe58f7 authored by 潘栩锋's avatar 潘栩锋 🚴

1

parent bb7ed0d0
...@@ -79,7 +79,10 @@ namespace Misc ...@@ -79,7 +79,10 @@ namespace Misc
Type t = typeof(T); Type t = typeof(T);
foreach (PropertyInfo propertyInfo in t.GetProperties()) foreach (PropertyInfo propertyInfo in t.GetProperties())
{ {
propertyInfo.SetValue(dest, propertyInfo.GetValue(src, null), null); if (propertyInfo.CanWrite)
{
propertyInfo.SetValue(dest, propertyInfo.GetValue(src, null), null);
}
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment