开发者

VS2010 c# find who is calling my indexer

开发者 https://www.devze.com 2023-03-13 13:05 出处:网络
I was wondering if someone could help me figure out how I can find out what the calling function is to an indexer withing Visual Studio 2010. When I look at the call stack window and expand the indexe

I was wondering if someone could help me figure out how I can find out what the calling function is to an indexer withing Visual Studio 2010. When I look at the call stack window and expand the indexer I'm watching (expand "Calls to 'this'") it shows "Searching" then says "Search开发者_运维问答 found no results". Thanks


You don't need to expand anything. When execution stops at your indexer - you'll see caller in the call stack window right at the second line (highlighted with red outline).

So, put breakpoint in the indexer, run program and wait until execution stops.

VS2010 c# find who is calling my indexer


Red Gate Reflector also has an analysis tool that will find all callers (via static analysis, you don't have to interrupt the program with a breakpoint). It used to be free but isn't any longer (If you write .NET software for a living, the $35 is well worth it. For open source hobbyists, not so much.). I'm not sure if the free clone ILSpy has that ability.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号