Home

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

Example

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.