VOOZH about

URL: https://www.nuget.org/packages/NCalcSync/

⇱ NuGet Gallery | NCalcSync 6.2.0




👁 Image
NCalcSync 6.2.0

dotnet add package NCalcSync --version 6.2.0
 
 
NuGet\Install-Package NCalcSync -Version 6.2.0
 
 
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NCalcSync" Version="6.2.0" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NCalcSync" Version="6.2.0" />
 
Directory.Packages.props
<PackageReference Include="NCalcSync" />
 
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add NCalcSync --version 6.2.0
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: NCalcSync, 6.2.0"
 
 
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package NCalcSync@6.2.0
 
 
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=NCalcSync&version=6.2.0
 
Install as a Cake Addin
#tool nuget:?package=NCalcSync&version=6.2.0
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

NCalc

👁 GitHub Actions Workflow Status
👁 Coverage
👁 NuGet
👁 NuGet Downloads
👁 Discord

NCalc is a fast, lightweight expression evaluator for .NET. It parses and evaluates mathematical and logical expressions with literals, operators, parameters, built-in functions, and custom functions.

NCalc targets modern .NET, .NET Standard 2.0, and .NET Framework 4.8.

Documentation

Start with the NCalc docs for the full language reference, runtime options, plugins, and API reference.

Useful entry points:

Install

Use NCalc.Core for the expression engine:

dotnet add package NCalc.Core

NCalcSync and NCalcAsync are obsolete redirect packages. Use NCalc.Core directly.

Add optional packages only when you need them:

dotnet add package NCalc.LambdaCompilation
dotnet add package NCalc.DependencyInjection

Quick Examples

Evaluate an expression

using NCalc;

var result = new Expression("2 + 3 * 5").Evaluate();
// 17

Use parameters

var expression = new Expression("Round(Pow([x], 2) + [offset], 2)");
expression.Parameters["x"] = 3.14;
expression.Parameters["offset"] = 10;

var result = expression.Evaluate();
// 19.86

Add custom functions

var expression = new Expression("SecretOperation(3, 6)");
expression.Functions["SecretOperation"] = args =>
 (int)args.Evaluate(0) + (int)args.Evaluate(1);

var result = expression.Evaluate();
// 9

Compile to a lambda

Install NCalc.LambdaCompilation first.

using NCalc.LambdaCompilation;

var expression = new Expression("1 + 2");
Func<int> function = expression.ToLambda<int>();

var result = function();
// 3

For data types, operators, built-in functions, async evaluation, caching, expression serialization, and advanced configuration, check the docs.

Help

Open an issue for bugs or usage problems. Include the expression, the expected result, the actual result, and your NCalc version.

Learn More

Related Projects

Project Description
FastExpressionCompiler Fast compiler for C# expression trees. NCalc uses it for lambda compilation.
Jint JavaScript interpreter for .NET by Sebastien Ros, the original author of NCalc.
JJMasterData Runtime form generator that uses NCalc for field visibility and other dynamic behavior.
NCalc101 Web application for trying NCalc expressions, developed by Panoramic Data.
NCalcJS TypeScript/JavaScript port of NCalc.
PanoramicData.NCalcExtensions Extension functions for NCalc, including string functions, switch, if, in, typeOf, and cast.
Parlot Fast and lightweight parser creation tools by Sebastien Ros. NCalc uses Parlot in its default parser.

Using NCalc? Create a PR and add your project here!

Versioning

NCalc uses Nerdbank.GitVersioning. Each library build can be traced back to the original git commit. Read more in the release documentation.

Star History

<a href="https://star-history.com/#ncalc/ncalc&Date"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=ncalc/ncalc&type=Date&theme=dark" /> <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=ncalc/ncalc&type=Date" /> <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=ncalc/ncalc&type=Date" /> </picture> </a>

Product Versions Compatible and additional computed target framework versions.
.NET net5.0 net5.0 was computed.  net5.0-windows net5.0-windows was computed.  net6.0 net6.0 was computed.  net6.0-android net6.0-android was computed.  net6.0-ios net6.0-ios was computed.  net6.0-maccatalyst net6.0-maccatalyst was computed.  net6.0-macos net6.0-macos was computed.  net6.0-tvos net6.0-tvos was computed.  net6.0-windows net6.0-windows was computed.  net7.0 net7.0 was computed.  net7.0-android net7.0-android was computed.  net7.0-ios net7.0-ios was computed.  net7.0-maccatalyst net7.0-maccatalyst was computed.  net7.0-macos net7.0-macos was computed.  net7.0-tvos net7.0-tvos was computed.  net7.0-windows net7.0-windows was computed.  net8.0 net8.0 is compatible.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 was computed.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 is compatible.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
.NET Core netcoreapp2.0 netcoreapp2.0 was computed.  netcoreapp2.1 netcoreapp2.1 was computed.  netcoreapp2.2 netcoreapp2.2 was computed.  netcoreapp3.0 netcoreapp3.0 was computed.  netcoreapp3.1 netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 netstandard2.0 is compatible.  netstandard2.1 netstandard2.1 was computed. 
.NET Framework net461 net461 was computed.  net462 net462 is compatible.  net463 net463 was computed.  net47 net47 was computed.  net471 net471 was computed.  net472 net472 was computed.  net48 net48 was computed.  net481 net481 was computed. 
MonoAndroid monoandroid monoandroid was computed. 
MonoMac monomac monomac was computed. 
MonoTouch monotouch monotouch was computed. 
Tizen tizen40 tizen40 was computed.  tizen60 tizen60 was computed. 
Xamarin.iOS xamarinios xamarinios was computed. 
Xamarin.Mac xamarinmac xamarinmac was computed. 
Xamarin.TVOS xamarintvos xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (39)

Showing the top 5 NuGet packages that depend on NCalcSync:

Package Downloads
PanoramicData.NCalcExtensions

Extensions for NCalc

PGCG.commonItems

Package Description

NINA.Sequencer

This assembly contains the advanced Sequencer components of N.I.N.A. and the plugin definitions.

Asgard.Yggdrasil

阿斯加德框架集核心库

PikTools.NonModelElements.Shared

Набор инстументов, содержащих общую логику приложения "Создание немоделируемых элементов"

GitHub repositories (12)

Showing the top 12 popular GitHub repositories that depend on NCalcSync:

Repository Stars
ErsatzTV/legacy
Open-source platform that transforms your personal media library into live, custom TV channels.
squiggythings/WaveTracker
A free and open source music-making software for Windows. Uses wavetable synthesis and sampling to generate sounds.
textadventures/quest
Create text adventure games
AscensionGameDev/Intersect-Engine
Intersect provides a complete game development suite for creating 2d mmorpgs with no programming experience required!
MrCMS/MrCMS
Mr CMS is an open source C# MVC CMS Framework
egvijayanand/dotnet-maui-samples
Sample apps for working with .NET MAUI
JJConsulting/JJMasterData
.NET CRUD generator library with Bootstrap support to create dynamic forms at runtime from a data dictionary.
isbeorn/nina
N.I.N.A. (Nighttime Imaging 'N' Astronomy) - Advanced astrophotography sequencing software for Windows, supporting full automation of imaging sessions.
naweed/MauiScientificCalculator
Scientific Calculator built using #dotnetmaui
pre-martin/StreamDeckSimHubPlugin
Keep your Stream Deck buttons in sync with SimHub (and your simulation)
densen2014/Blazor100
Blazor入门100天
Seddryck/NBi
NBi is a testing framework (add-on to NUnit) for Business Intelligence and Data Access. The main goal of this framework is to let users create tests with a declarative approach based on an Xml syntax. By the means of NBi, you don't need to develop C# or Java code to specify your tests! Either, you don't need Visual Studio or Eclipse to compile your test suite. Just create an Xml file and let the framework interpret it and play your tests. The framework is designed as an add-on of NUnit but with the possibility to port it easily to other testing frameworks.
Version Downloads Last Updated
6.2.0 687 6/17/2026
6.1.1 3,579 6/11/2026
6.1.0 6,903 6/7/2026 6.1.0 has at least one vulnerability with moderate severity.
6.0.0 2,848 6/6/2026 6.0.0 is deprecated; 6.0.0 has at least one vulnerability with moderate severity.
5.13.0 6,714 6/4/2026 5.13.0 has at least one vulnerability with moderate severity.
5.12.0 279,975 2/19/2026 5.12.0 has at least one vulnerability with moderate severity.
5.11.0 169,467 12/19/2025 5.11.0 has at least one vulnerability with moderate severity.
5.10.0 28,202 12/18/2025 5.10.0 has at least one vulnerability with moderate severity.
5.9.0 74,644 12/2/2025 5.9.0 has at least one vulnerability with moderate severity.
5.8.0 169,142 11/4/2025 5.8.0 has at least one vulnerability with moderate severity.
5.7.0 142,425 9/22/2025 5.7.0 has at least one vulnerability with moderate severity.
5.6.0 171,319 8/3/2025 5.6.0 has at least one vulnerability with moderate severity.
5.5.0 71,763 7/9/2025 5.5.0 has at least one vulnerability with moderate severity.
5.5.0-alpha 9,778 2/14/2025 5.5.0-alpha has at least one vulnerability with moderate severity.
5.4.2 176,147 4/29/2025 5.4.2 has at least one vulnerability with moderate severity.
5.4.1 169,133 2/14/2025 5.4.1 has at least one vulnerability with moderate severity.
5.4.0 27,665 2/14/2025 5.4.0 has at least one vulnerability with moderate severity.
5.3.1 121,332 12/18/2024 5.3.1 has at least one vulnerability with moderate severity.
5.3.0 101,582 11/16/2024 5.3.0 has at least one vulnerability with moderate severity.
5.2.11 338,797 10/25/2024 5.2.11 has at least one vulnerability with moderate severity.
Loading failed