Comparing the properties of two objects via Reflection and C#

added by cyotek
11/5/2010 6:30:31 PM

1 Kicks, 230 Views

As part of the refactoring I was doing to the load code for crawler projects I needed a way of verifying that new code was loading data correctly. As it would be extremely time consuming to manually compare the objects, I used Reflection to compare the different objects and their properties. This article briefly describes the process and provides a complete helper function you can use in your own projects.