Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Find references for C# 7.0 pattern matching
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

mkoe
Junior Member

13 Posts

Posted - Sep 28 2020 :  10:58:29 AM  Show Profile  Reply with Quote
Find references doesn't find class methods of an instance created by "Type testing with pattern matching".

Let's say we have the following class:

public class Foo
{
    public void Bar() {}
}

and the following part of code:

object fooObject = new Foo();
if (fooObject is Foo foo)
{ 
    foo.Bar();
}

"Find References" does not work on the function call and "Find References" finds only a guess hit when used on the method definition.

feline
Whole Tomato Software

United Kingdom
19025 Posts

Posted - Sep 29 2020 :  08:02:14 AM  Show Profile  Reply with Quote
I am seeing the same effect here. Thank you for the clear description.

case=141137

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000