From 6901edd21b3fdd2126be97c9955a21b44c253c66 Mon Sep 17 00:00:00 2001 From: Thieum Date: Wed, 4 Sep 2013 15:37:20 -0400 Subject: [PATCH] Corrected unit tests for non en-US system didnt break current behavior, but Culture should be handled explicitely through the API. --- SimpleExpressionEvaluator/ExpressionEvaluator.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SimpleExpressionEvaluator/ExpressionEvaluator.cs b/SimpleExpressionEvaluator/ExpressionEvaluator.cs index 856863e..5fbbaac 100644 --- a/SimpleExpressionEvaluator/ExpressionEvaluator.cs +++ b/SimpleExpressionEvaluator/ExpressionEvaluator.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Dynamic; +using System.Globalization; using System.IO; using System.Linq; using System.Linq.Expressions; @@ -227,7 +228,7 @@ private Expression ReadOperand(TextReader reader) } } - return Expression.Constant(decimal.Parse(operand)); + return Expression.Constant(decimal.Parse(operand, CultureInfo.InvariantCulture)); } private Operation ReadOperation(TextReader reader)