There are two calls to the function B:Bla below, but looking at the call hierarchy (Cntl-K Cntl-T) and then 'Calls to' for each of A:Bla and B:Bla yields that one call is going to A and one call is going to B.
I'm working on a very large code base and sometimes I want the all calls to a function and I don't want to click 'Calls to' for each function in the inheritance chain. So for the below example, I would like 'Calls to' to return both calls, regardless of whether I called it on A:Bla or B:Bla.
using System;
class A
{
public virtual int Bla() {
return 65;
}
}
class B : A
{
public override int Bla()
{
return 66;
}
int Helper()
{
return this.Bla();
}
static void Main()
{
A obj = new B();
Console.WriteLine(obj.Bla());
Console.Read();
}
}
The keyboard shortcut is Ctrl + Shift + E .
Calling a Function Syntax. The syntax for calling a function in VB and VBA is lvalue = functionName (argument1, argument2) .
You can use the Call keyword when you call a procedure. For most procedure calls, you aren't required to use this keyword.
You can use the 'Find All References' function, highlight the method in question and press Ctrl + F12, or right click and pick Find All References.
This will then show the results in the Find Symbol Results window.
Please see this link for more details information. http://www.blackwasp.co.uk/VSFindAllReferences.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With