修复空指针的问题
This commit is contained in:
@@ -94,9 +94,13 @@ public static class ObjectExtensions
|
||||
tObj=Activator.CreateInstance(targetProperty.PropertyType);
|
||||
}
|
||||
|
||||
if (sObj!=null && tObj!=null)
|
||||
{
|
||||
CopyTo(sObj,tObj);
|
||||
targetProperty.SetValue(ttarget,tObj);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user