What is the best way to compare two arbitrary dynamic objects for equality? For example these two objects.
I.e.
dynamic obj1 = new ExpandoObject(); obj1.
Expando Objects are useable as an IDictonary so you should be able to use that.
IDictonary
Something like
Assert.AreEqual((IDictonary(object, string))obj1, (IDictonary(object, string))obj2);
Edit the AreEqual won't work.
AreEqual
But you could try comparing the two dictionaries fairly simply.