Relative Content

Tag Archive for c#lambda

Alternatives to LambdaExpression.Compile()

My WPF application (.Net 6) provides a way for users to define very simple boolean functions used to compare a variable ‘x’, e.g. x < 5 or x >=5 && x <= 10. During startup, these strings get compiled into delegates for use elsewhere across the application, using this code: