0

I parse a syntax tree to find method return type.

Now how to identify the source class definition of the type?

I need a sort of "go to definition" sample code.

Any suggestion?

Thanks

Claudio
  • 133
  • 2
  • 11
  • 1
    If I understand your question correctly then you can use `SemanticModel`'s `GetTypeInfo` , check if it is a `INamedTypeSymbol` and use it's `Locations` property. – Guru Stron Mar 10 '21 at 19:03
  • This is somewhat similar to https://stackoverflow.com/questions/45361709/roslyn-get-method-declaration-from-invocationexpression/45362532#45362532 – Kris Vandermotten Mar 22 '21 at 10:54

0 Answers0