What do you mean "comparing" tables? compare data?
In general, all objects have a method called "equals", but a table is a reference type, so equals returns true only if both references refer to the same object, and I assume this is not what you are looking for.
I don't think there is a function that does it.
You need to write it yourself, but you can make a table class that inherit from DataTable and override the equals method as you wish so your code will lokk nice (Don't forget to override the GetHashCode method).
If you want a challenge, make a general equals method that uses reflection to get all members of an instance and compare them to another instace members, but I don't think it worth.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.