ValueTuple name display?

edited August 18
Hey Joe,
At the risk of making your head too big. Linqpad is awesome, and I have been a big fan for years.

With that out of the way, I am wondering if you see a way to implement dumping of the user-assigned ValueTuple names when assigned? And if you think you might add support?

I have only looked into this for five minutes, but it looks like some compilers emit attributes that would allow you to enhance .Dump() to display this information. Of course, I am not certain and don't know the difficulty to do so.


Well, I would be interested to know if you think it is possible and you are considering using the user-assigned names as some point?


http://mustoverride.com/tuples_names/ [ search for TupleElementNames in page ]
https://msdn.microsoft.com/en-us/library/system.runtime.compilerservices.tupleelementnamesattribute(v=vs.110).aspx


Regards,
Cameron





Comments

  • edited August 18
    The TupleElementNames attribute isn't helpful because it's not attached to variables (only method/property signatures).

    Unfortunately, there's no other way to do this, other than perhaps doing some analysis on the source code - and even this would only work in simple cases.
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!