Visual Studio ‘Go To Definition’ menu option behaviour - Why is it inconsistent between C# and VB projects

江枫思渺然 提交于 2019-12-12 11:52:14

问题


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:


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.



来源:https://stackoverflow.com/questions/408959/visual-studio-go-to-definition-menu-option-behaviour-why-is-it-inconsistent

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!