You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
whenever I hover the mouse over the viables, classes, or simply anything, it shows me the reference like: var thing2 = (bob.Name, bob.Chidren.Count);
if I hover the mouse over var it shows: (string Name, int Count)
but that doesn't happen when I hover mouse over var while deconstruction in:
// deconstructing a person
var (name1, dob1) = bob;
is there a reason for it? it makes me confused.
Thanks in advance
The text was updated successfully, but these errors were encountered:
In all cases except deconstruction there is a single object so the tooltip shows the info about that variable. When you use deconstruction, there are multiple variables so hovering over var it does not know which variable info to show. You must hover over the named variables instead. Even though you only type one var, in effect you have multiple. So var (name, age)... is more like var name, var age...
That is my assumption anyway. It all depends on who designed how that feature of Visual Studio should work. You'd need to ask the Microsoft product manager who designed that feature to get a definitive answer. They could have decided to implement it a different way, perhaps showing a tooltip with multiple rows for each variable, but I can imagine that getting messy. I think they made the right decision.
whenever I hover the mouse over the viables, classes, or simply anything, it shows me the reference like:
var thing2 = (bob.Name, bob.Chidren.Count);
if I hover the mouse over var it shows:
(string Name, int Count)
but that doesn't happen when I hover mouse over var while deconstruction in:
is there a reason for it? it makes me confused.
Thanks in advance
The text was updated successfully, but these errors were encountered: