[Bug Report] NullReferenceException in LINQPad.Extensions.Dump w/ NameValueCollection w/ nulls
The NameValueCollection
collection type allows null
names and null
values:
NameValueCollection nvc = new NameValueCollection(); nvc.Add( name: "name1", value: null ); nvc.Add( name: "name2", value: "123" ); nvc.Add( name: null , value: "456" );
I can iterate the contents manually just fine in LinqPad:
foreach( Object? nameObj in nvc ) { String? name = (String?)nameObj; String[]? values = nvc.GetValues( name ); if( values is null ) { ( name, "special null" ).Dump(); } else { foreach( String? v in values ) { ( name, v ).Dump(); } } }
...but using nvc.Dump()
causes an internal NRE:
//nvc.Dump();
Answers
-
Thanks - I'll get a fix into the next build.