Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A Simple Math and Pseudo C# Expression Evaluator in One C# File. Can also execute small C# like scripts

License

NotificationsYou must be signed in to change notification settings

codingseb/ExpressionEvaluator

Repository files navigation

ExpressionEvaluator Icon

ExpressionEvaluator

⚠️ For now, I don't have time to maintain this repository. So if you have PR to fix some bugs. I'll be happy to review and merge it. Otherwise, I will no longer actively develop ExpressionEvaluator. If the current state of the lib do not suite your needs I suggest you look thelist of great alternative projects below.

A Simple Math and Pseudo C# Expression Evaluator in OneC# File.

And from version 1.2.0 can execute small C# like scripts

It is largely based on and inspired by the following resources this post on stackoverflow,NCalc,C# Operators andC# Statement Keywords

Status

BranchStatus
masterBuild Status
devDev Status
nugetNuGet Status

Features

And withScriptEvaluate method

  • Small C# like script evaluation (Multi expressions separated by ; )
  • Some conditional and loop blockskeywords (if, while, for, foreach ...)
  • Multi-line (multi expression) Lambda expressions. (Can be use as methodSee #72 Declare methods in scripts and thedoc)

Resources

Similar projects

Free

Commercial

Projects that could help you build your own expression/script evaluator

Reading and resources

I would say every C# evaluation libraries have drawbacks and benefits, ExpressionEvaluator is not an exception so choose wisely (Read docs and licences).

The biggest difference of ExpressionEvaluator is that everything is evaluated on the fly, nothing is compiled or transpile nor in CLR/JIT/IL nor in lambda expressions nor in javascript or other languages stuffs.So it can be slower in some cases (sometimes not) but it also avoid a lot of memory leaks. It is clearly not optimized for big reuse of expressions as the expression is reevaluated every time (Filtering on big dataset for example).It already allow to evaluate some small scripts.If you don't want an another .dll file in your project, you only need to copy oneC# file in your project. And it'sMIT licence

Donate

Expression Evaluator is free and will always be.
But if you want to say thanks for this lib with a donation or small sponsoring here you can :
Donate

Thank you anyway for using ExpressionEvaluator


[8]ページ先頭

©2009-2025 Movatter.jp