In C#, you can do this:
https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/is#type-pattern
For example:
object variable;
if(variable is SomeType sometype)
{
sometype.MemberFunc(); // use - VA Find References will not work from here - BUG
}
Of course, you should declare and define the class, and the member function somewhere:
class SomeType
{
public void MemberFunc(){} // declaration - VA Find References will work from here of course
}
But, if you try to 'Find References' for the MemberFunction with Visual Assist, it will work properly only if do it from the *declaration. If you do it from the *use, you will get the following window:
"Find References is not available because the symbol is unrecognized."
If you use the next syntax, it also work fine:
if(variable is SomeType)
{
SomeType sometype = (SomeType) variable;
sometype.MemberFunction(); // VA Find References will work!
}