Commit 87d5e93d authored by 潘栩锋's avatar 潘栩锋 🚴

修复 CopyTo 无法复制子类

parent 84177858
......@@ -125,7 +125,7 @@ namespace Misc
public static void CopyTo(object src, object dest)
{
Type t = src.GetType();
if (src.GetType() != dest.GetType())
if (!src.GetType().IsAssignableFrom(dest.GetType()))
{
throw new Exception("CopyTo src.GetType() != dest.GetType()");
}
......
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