views:

44

answers:

1

I'm unable to find the .NET FCL built-in concept of precedence to leverage while constructing Expression Trees. Ref System.Linq.Expressions Namespace. Is this something that must be handled manually in code, or is it somehow implicit and I'm not recognizing it, maybe through helper methods or classes?

I want to apply it to math operations to ensure 3 + 5 * 10 results in 53 instead of 80.

A: 

The whole point of representing code as a tree is that the precedence is encoded in the tree structure itself, so that you do not need to care about it.

Jörg W Mittag
If anybody knows of helper classes to encode the tree accordingly to recommended precedence rules, within the FCL, then I'll be that much further ahead.
John K