Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有两个类,它们拥有许多相同的属性,每个类都有一些不被另一个共享的。
同步两个对象的共享属性的最快方法是什么?我知道它可以通过反射很容易地完成,但我敢打赌,在框架的某个地方,有一些东西可以使这个过程成为一个衬里左右。
谢谢。
恐怕框架中没有好东西可以单线执行此过程。虽然有AutoMapper可用于此任务。