Question: best way to get operator method in reflection
Question: What is best practice to find an operator overload method in reflection?
I believe the names of the methods are for example "op_Addition" and such, but I can't find any official documentation on this.
Is there good way to do this without using magic string based on inofficial information?
What I'm trying to implement a IQueryExpressionInterceptor, in which i need to identify for example the addition operator.
Tagging subscribers to this area: @dotnet/area-system-reflection See info in area-owners.md if you want to be subscribed.
Issue Details
Question: What is best practice to find an operator overload method in reflection?
I believe the names of the methods are for example "op_Addition" and such, but I can't find any official documentation on this.
Is there good way to do this without using magic string based on inofficial information?
What I'm trying to implement a IQueryExpressionInterceptor, in which i need to identify for example the addition operator.
| Author: | lilinus |
|---|---|
| Assignees: | - |
| Labels: |
|
| Milestone: | - |
You can find all of the operator method names documented here.
Yes the name can be checked; I am not aware of a property or other way to determine whether a given method is an operator overload.