Find interface implementation members

Is there a way to find the members in a class that implement a specific
interface? For example, say I have a class as follows:

public class Blah : IComparable
{
...
}

Initially I right clicked on the interface name (IComparable) in the class
declaration, selected Find Usages Advanced, checked Extending Interfaces
and/or Implementations, but ReSharper would find only the interface name in
the class declaration. What I want is for ReSharper to know that IComparable
defines the CompareTo method and to show me the CompareTo method in the
class.

What I'm really doing is updating some old .NET 1.1 code to .NET 2.0 to use
strongly-typed generics and I would love to be able to hover my mouse over a
non-generic entity and have ReSharper tell me the entity can be changed from
say IComparable to IComparable or that the entity is overloaded (e.g. it's both IComparable and IComparable]]>) and should be fixed. I've
already found a couple places where someone did this by mistake and fixed a
few bugs just by following the error highlighting after changing members to
generics.

1 comment
Comment actions Permalink

Hello Lothan,

yes, it's possible to find the members in a class implementing a specific
interface: instead of Find Usages, use 'Navigate from Here|Implementing Members'
from the context menu.

Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


Is there a way to find the members in a class that implement a
specific interface? For example, say I have a class as follows:

public class Blah : IComparable
{
...
}
Initially I right clicked on the interface name (IComparable) in the
class declaration, selected Find Usages Advanced, checked Extending
Interfaces and/or Implementations, but ReSharper would find only the
interface name in the class declaration. What I want is for ReSharper
to know that IComparable defines the CompareTo method and to show me
the CompareTo method in the class.

What I'm really doing is updating some old .NET 1.1 code to .NET 2.0
to use strongly-typed generics and I would love to be able to hover my
mouse over a non-generic entity and have ReSharper tell me the entity
can be changed from say IComparable to IComparable<Blah> or that the
entity is overloaded (e.g. it's both IComparable<Foo> and
IComparable<Bar>) and should be fixed. I've already found a couple
places where someone did this by mistake and fixed a few bugs just by
following the error highlighting after changing members to generics.



0

Please sign in to leave a comment.