IEnumberable.Dump with exclusions

Hi Joe

Any reason why the following doesn't work?
((IEnumerable) new[] { new { X = 1, Y = 2 } }).Dump(exclude: "X"); // doesn't work

Thanks

Alex

Comments

  • The exclude option applies only to the type that's been dumped. This is so that when you expand sub-objects, properties with the same name won't also get excluded. So by casting to IEnumerable, you'll telling LINQPad to exclude property "X" on the IEnumerable type (which doesn't exist).
  • Aha, I see! Thank you
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!