Parse a Condition written in the String to C# Code and execute the same
See the question and my original answer on StackOverflowThere is an answer here on SO that explain how to reuse the Javascript engine DLL that's shipped with every Windows installation: parse and execute JS by C#.
It has a sample with a function that you could adapt to your need.