Util.ToExpando throws an error if the object has a property defined twice.


void Main() { var x2 = new X2(); Util.ToExpando(x2).Dump(); // An element with the same key 'Test1' already exists in the ExpandoObject } public class X1 { public string Test1 = "1"; } public class X2 : X1 { public string Test1 = "1a"; public string Test2 = "1b"; }

Not a big issue, but I just happened to try calling Util.ToExpando on a SqlTransaction which defines Connection twice and it throw an error.


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!