5

Say I make the following query expression:

var clients =  
    (from c in Clients  
     where (c.Age == 20)  
     select new { c.FirstName, c.LastName }  
    ).ToList();

Calling clients.Dump() in Linqpad shows the following in the Results Panel:

List<> (5 items)

Is there a way to rename the set's header, to let's say 'clients', instead of 'List<> (5 items)'?

Jaimie Knox
  • 167
  • 2
  • 4
  • 13

1 Answers1

7

The header indicates the type, so you can't rename it without changing the collection type. Instead, you would normally call .Dump with a heading:

clients.Dump ("clients")

and then you get the list with a heading of 'clients'.

thepirat000
  • 12,362
  • 4
  • 46
  • 72
Joe Albahari
  • 30,118
  • 7
  • 80
  • 91
  • 1
    For anyone curious, you can see what clients.Dump("Clients") looks like [here](http://i.imgur.com/vQRLXKb.png). – Jaimie Knox May 06 '16 at 20:33