I am trying to use C# Expression Trees for a rule engine and ran into an issue with Version comparison. I would like the expression to do something like
Version < "4.5.1"
but C# Expressions consider the version value as string and do not allow lessthan operator on it. I could create a custom method for this comparison by pre-identifying the string value as a Version number (RegEx comparison) but I was hoping to find a way where C# Expression can identify is directly.
I was not able to find any documentation or examples on how I can create an Expression that could compare versions.
Any help here would be appreciated