We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 85cadd3 commit 7b081d7Copy full SHA for 7b081d7
1 file changed
docs/Packages/NCalc.md
@@ -0,0 +1,25 @@
1
+## Overview
2
+- NCalc is a fast and lightweight expression evaluator library for .NET
3
+- designed for flexibility and high performance.
4
+- It supports a wide range of mathematical and logical operations.
5
+- Use `dotnet add package NCalcSync` to install nuget package
6
+- Add `using NCalc;`
7
+
8
+## Simple Expression
9
10
+```csharp
11
+var expression = new Expression("2 + 3 * 5");
12
+Console.WriteLine($"Result: {expression.Evaluate()}");
13
+```
14
+## Equations with variables
15
16
+string exprText = "2 + 3 * x - Sin(y)";
17
18
+var expr = new Expression(exprText);
19
20
+expr.Parameters["x"] = 4;
21
+expr.Parameters["y"] = Math.PI / 2;
22
23
+var result = expr.Evaluate(); // result = 2 + 3*4 - 1 = 13
24
+Console.WriteLine(result);
25
0 commit comments