Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Find references for C# 7.0 pattern matching

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
mkoe Posted - Sep 28 2020 : 10:58:29 AM
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.
1   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Sep 29 2020 : 08:02:14 AM
I am seeing the same effect here. Thank you for the clear description.

case=141137

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000