简体   繁体   English

如何解释Visual Studio / TFS引用计数(VS2015,C#)

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

Sometimes, the reference count in Visual Studio 2015 doesn't make sense to me. 有时,Visual Studio 2015中的引用计数对我来说没有意义。

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. 让我们以下面的屏幕快照为例:该类是ASP.NET Web窗体页面的“代码背后”,该页面继承了自定义基础页面。

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..? 据说此类的OnInit方法有140个引用,但实际上它不可能有多个引用,是吗? 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; BasePage的 OnInit可能有140个引用,或者更有可能是BasePage继承的Page类,但没有这个唯一类中的那个。 "ArticlePage". “ 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. 似乎Visual Studio似乎很高兴地将对任何名为“ OnInit”的方法的引用视为对此特定方法的引用-这对我来说显然是错误的。

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之间的逻辑相同)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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