Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Core
  3. NReco.LambdaParser

NReco.LambdaParser

MITC#

A runtime parser for .NET that evaluates string expressions (formulas, method calls) by building dynamic LINQ expression trees.

Visit WebsiteGitHubGitHub
314 stars58 forks0 contributors

What is NReco.LambdaParser?

NReco LambdaParser is a .NET library that parses and evaluates string expressions at runtime by building dynamic LINQ expression trees and compiling them to lambda delegates. It solves the need for runtime formula evaluation, method invocation, and property access in applications where expressions are not known at compile time, such as user-defined calculations or dynamic query builders.

Target Audience

.NET developers building applications that require runtime evaluation of expressions, such as formula engines, reporting tools, dynamic query systems, or configuration-driven calculations.

Value Proposition

Developers choose LambdaParser for its seamless integration with .NET's LINQ ecosystem, support for complex expression syntax, runtime type resolution, and performance optimizations like caching, making it a robust alternative to manual expression tree construction or scripting engines.

Overview

Runtime parser for string expressions (formulas, method calls). Builds dynamic LINQ expression tree and compiles it to lambda delegate.

Use Cases

Best For

  • Evaluating user-defined formulas in reporting or analytics applications
  • Building dynamic query builders with runtime expression support
  • Implementing configuration-driven calculation engines
  • Adding scripting-like capabilities to .NET applications without a full scripting engine
  • Parsing and executing expressions from external sources (e.g., config files, databases)
  • Creating flexible rule engines with conditional logic and arithmetic operations

Not Ideal For

  • Applications with strict security requirements that prohibit runtime code execution from untrusted sources
  • Projects needing full C# language support, including async/await or LINQ query syntax
  • Teams requiring extensive community-driven tutorials or third-party integrations for quick adoption

Pros & Cons

Pros

LINQ Expression Integration

Compiles string expressions directly into LINQ expression trees, enabling seamless use with .NET's querying and data manipulation frameworks without manual tree construction.

Dynamic Type Resolution

Automatically handles type conversions at runtime, similar to dynamic languages, reducing boilerplate for expressions with mixed data types.

Rich Syntax Support

Supports a wide range of operations including arithmetic, conditionals, method calls, and data structures like arrays and dictionaries, covering common formula evaluation needs.

Performance Caching

Built-in expression caching via the UseCache property optimizes repeated evaluations, as highlighted in the README for scenarios with frequent same-expression usage.

Cons

Security Vulnerabilities

Runtime compilation of user-provided expressions can introduce code injection risks if input is not sanitized, limiting use in high-security environments without additional safeguards.

Missing Advanced Features

Lacks support for modern C# features such as asynchronous operations or complex LINQ queries, which may require workarounds or alternative libraries for advanced scenarios.

Memory Overhead with Caching

Enabling cache for performance can lead to increased memory usage when evaluating a large number of unique expressions, as noted in the README's recommendation to disable cache in such cases.

Frequently Asked Questions

Quick Stats

Stars314
Forks58
Contributors0
Open Issues11
Last commit8 months ago
CreatedSince 2016

Tags

#expression-parser#evaluator#csharp#linq#runtime-evaluation#dotnet#formula-engine#dotnetcore#lambda-expressions#dot-net

Built With

L
LINQ
.
.NET

Links & Resources

Website

Included in

Core21.2k
Auto-fetched 1 hour ago

Related Projects

AutoMapperAutoMapper

A convention-based object-object mapper in .NET.

Stars10,195
Forks2,406
Last commit16 hours ago
HumanizerHumanizer

Humanizer meets all your .NET needs for manipulating and displaying strings, enums, dates, times, timespans, numbers and quantities

Stars9,741
Forks1,058
Last commit1 month ago
AngleSharpAngleSharp

:angel: The ultimate angle brackets parser library parsing HTML5, MathML, SVG and CSS to construct a DOM based on the official W3C specifications.

Stars5,507
Forks593
Last commit10 days ago
markdigmarkdig

A fast, powerful, CommonMark compliant, extensible Markdown processor for .NET

Stars5,274
Forks509
Last commit13 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub