We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
In VB.Net with the following input:
Try '... Catch exc As Exception Console.WriteLine(exc.ToString()) End Try
when I query the DeclaringSyntaxReferences of the local symbol of exc, an empty list is returned.
DeclaringSyntaxReferences
exc
The problem seems to be that VariableLocalSymbol expects to have a ModifiedIdentifierSyntax, but in case of the catch statement it has an IdentifierNameSyntax, so it returns empty list: http://source.roslyn.codeplex.com/#Microsoft.CodeAnalysis.VisualBasic/Symbols/Source/LocalSymbol.vb,44cfe5cfa177deb7,references
VariableLocalSymbol
ModifiedIdentifierSyntax
IdentifierNameSyntax
If I do the same in C#, I get the reference without a problem.