When I call the ToString () methods in an expression, the enum value is printed as integers. Is there any kind of format overload?
Perhaps I can create derviedclass from the expression and override some ToString method. Any thoughts?
Here is an example:
public enum LengthUnits { METRES, FEET }; Expression<Func<LengthUnits, bool>> isFeet = l => l == LengthUnits.FEET; string isFeetFunctinoAsString = isFeet.ToString();
Value isFeetFunctinoAsString:
u => (Convert(u) = 1)
I do not want 1, but KNIFE.
Toto source share