Structural search and replace: Search for interfaces in class declaration?
[5.1.1708]
I have following code:
public class Foo : IComparable
{
public int CompareTo(object obj) { throw new NotImplementedException(); }
public int Bar<T>(T obj) where T : IComparable { throw new NotImplementedException(); }
}
I use search pattern: $comparable$
where comparable placeholder is declared as Type System.IComparable (not derived types).
However this only finds the IComparable used as constraint in the Bar method, not the IComparable in the Foo : IComparable declaration.
Is it possible somehow to make the search (or another structural search search) to also find the IComparable in "public class Foo : IComparable" ?
Thanks.
Please sign in to leave a comment.
Currently, Search with Pattern works only on type member level (e. g. on methods or properties). Searching for specific classes/interfaces will be possible in future versions. ReSharper 5.1 is intended to be a bugfix release, and it will not have such functionality.