Home
Options

Util.Dif with the Uncapsulate() conflict

edited March 26

I'm trying to diff two object with Uncapsulate() method. It failed.

Util.Dif(model.Uncapsulate().Dump(), model2.Uncapsulate().Dump()).Dump("DIF");

My actual need is to compare two objects including private properties.

My query: https://share.linqpad.net/82aq6kdw.linq

Comments

  • Options

    You need to use

    LINQPad.Extensions.Dump(Util.Dif(model .Uncapsulate().Dump(), model2.Uncapsulate()), "DIF");

    The intellisense as you type .Dump as you have done is confusing as it implies that Dump will work, but if you try assigning your result to a variable and dumping that variable the intellisense tells it won't and what you need to do,

  • Options

    It works. Thank you so much. :)

Sign In or Register to comment.