IEnumberable.Dump with exclusions
Options
Hi Joe
Any reason why the following doesn't work?
Thanks
Alex
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