Get type information for type declared in another assembly/project

前端 未结 1 358
自闭症患者
自闭症患者 2021-01-15 14:31

So as the title says I\'m trying to get type information from types declared in another assembly using Roslyn. Initially I tried to do this by manually looking through refer

相关标签:
1条回答
  • 2021-01-15 15:00

    Don't call GetTypeInfo. Instead, once you have the PropertyDeclarationSyntax, call GetDeclaredSymbol with that declaration syntax, and you will get the IPropertySymbol for that property. From there, you can grab IPropertySymbol.Type, which is the type you're looking for.

    0 讨论(0)
提交回复
热议问题