lambda expression based reflection vs normal reflection

后端 未结 1 1807
梦毁少年i
梦毁少年i 2021-01-21 12:31

What is the difference between normal reflection and the reflection that can be done with lambda expressions such as this (taken form build your own MVVM):

publi         


        
相关标签:
1条回答
  • 2021-01-21 12:56

    Reflection targets assembly, class and interface structure. It gives access to class definitions, method signatures, type information, and so on. It doesn't provide access the code of methods, either in Abstract Syntax Tree (AST) or bytecode form.

    The Expression<> type family provides direct access to an AST, which can be used to glean the structure of a piece of code. This is actually much closer to the CodeDOM facility than to reflection.

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