Visual Studio ‘Go To Definition’ menu option behav

2019-06-23 23:33发布

When developing in a VS2005+ with C# project and I right click on a framework method/property/type and select ‘Go To Definition’, by default we get a new locked tab with code that has been generated from the framework, labelled appropriately [from metadata].

However when we do the same in a VB.NET project, you get taken to a new tab with the relevant Object Browser view.

This has always struck me as peculiar and was hoping there was a good reason behind it. IMO the object browser is nicer.

Is there a logical reason for the difference in default visual studio behaviour? If so, what is it?

1条回答
Viruses.
2楼-- · 2019-06-24 00:34

It's a choice each team made based on what they believe their respective customers wanted to see. VB users have a historical attachment to the object browser and many VB features are integrated into it (Go To Def being one of them). C# made a switch in VS2005 to generate metadata on the fly for their version of GoTo def because they believed their customers would like the behavior better.

查看更多
登录 后发表回答