简体   繁体   中英

How to interpret Visual Studio / TFS reference count (VS2015, C#)

Sometimes, the reference count in Visual Studio 2015 doesn't make sense to me.

Let's take the screenshot below as an example: The class is the "code behind" of an ASP.NET Web Forms page, which inherits a custom base page.

The OnInit method of this class is said to have 140 references, but in fact it's not likely to have more than one, is it..? The BasePage's OnInit might possibly have 140 references, or even more likely the Page class that BasePage inherits, but not the one in this unique class; "ArticlePage".

It almost seems as if Visual Studio happily considers any reference to any method named "OnInit" as a reference to this particular method - which seems plainly wrong to me.

Can anyone explain how the reference count, and the associated reference links, are to be interpreted in a case like this?

屏幕截图

看一下这篇文章中的jessehouwing的答案: VS 2013 Ultimate中不正确的codelens引用 (经过一些测试,vs2013和vs2015之间的逻辑相同)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM