When you want to have a richer interaction, you need to use Expression Trees. Expression Trees represent code as a structure that you can examine, modify, or execute. These tools give you the power to manipulate code during run time. You can write code that examines running algorithms, or injects new capabilities.
Expression Tree is a special kind of binary tree with the following properties: Each leaf is an operand. Examples: a, b, c, 6, 100. The root and internal nodes are operators.
Expression trees represent code in a tree-like data structure, where each node is an expression, for example, a method call or a binary operation such as x < y . You can compile and run code represented by expression trees.
Expression trees allow you to build code dynamically at runtime instead of statically typing it in the IDE and using a compiler. They are well explained in the documentation.
I need to call unsafe
method that takes raw pointers.
For that I need to construct Expression
that represents pointer to value represented by VariableExpression
or ParameterExpression
.
How to do that?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With