I work with a codebase where several classes implement an indexer:
public double this[int i, int j]
{
get { return ...; }
set { ...; }
}
When I stumble over code like foo[1,2] = 3
in visual Studio 2008, I frequently want to
right-click / "go to definition", i.e. show the above definition in the visual studio editor window.
For normal properties or methods this works without problems:
foo.bar = 3
, right-click / "go to definition" takes me to the source code for foo.bar.
For overloaded +
or ==
this works as well.
However with the indexer this does not seem to work. Is there any way to accomplish this?
(I cannot even search for the string "this[" in the appropriate source file, since the same syntax may be used throughout the class to access the indexer. I always have to scroll trough all the methods and properties in the dropdown list for this file)