diff --git a/csharp/StatHat.cs b/csharp/StatHat.cs index 1ed83da..658aa0b 100644 --- a/csharp/StatHat.cs +++ b/csharp/StatHat.cs @@ -3,6 +3,7 @@ using System.IO; using System.Text; using System.Collections.Generic; +using System.Globalization; namespace StatHat { @@ -71,7 +72,7 @@ public static void Counter(string key, string ukey, float count) Dictionary p = new Dictionary(); p.Add("key", key); p.Add("ukey", ukey); - p.Add("count", count.ToString()); + p.Add("count", count.ToString(CultureInfo.InvariantCulture)); new FormPoster(Post.BaseUrl, "/c", p); } @@ -98,7 +99,7 @@ public static void Value(string key, string ukey, float value) Dictionary p = new Dictionary(); p.Add("key", key); p.Add("ukey", ukey); - p.Add("value", value.ToString()); + p.Add("value", value.ToString(CultureInfo.InvariantCulture)); new FormPoster(Post.BaseUrl, "/v", p); } /// @@ -123,7 +124,7 @@ public static void EzCounter(string ezkey, string stat, float count) Dictionary p = new Dictionary(); p.Add("ezkey", ezkey); p.Add("stat", stat); - p.Add("count", count.ToString()); + p.Add("count", count.ToString(CultureInfo.InvariantCulture)); new FormPoster(Post.BaseUrl, "/ez", p); } @@ -149,7 +150,7 @@ public static void EzValue(string ezkey, string stat, float value) Dictionary p = new Dictionary(); p.Add("ezkey", ezkey); p.Add("stat", stat); - p.Add("value", value.ToString()); + p.Add("value", value.ToString(CultureInfo.InvariantCulture)); new FormPoster(Post.BaseUrl, "/ez", p); } @@ -176,7 +177,7 @@ public static void Counter(string key, string ukey, float count, ReplyDelegate r Dictionary p = new Dictionary(); p.Add("key", key); p.Add("ukey", ukey); - p.Add("count", count.ToString()); + p.Add("count", count.ToString(CultureInfo.InvariantCulture)); new FormPoster(Post.BaseUrl, "/c", p, replyDelegate); } /// @@ -203,7 +204,7 @@ public static void Value(string key, string ukey, float value, ReplyDelegate rep Dictionary p = new Dictionary(); p.Add("key", key); p.Add("ukey", ukey); - p.Add("value", value.ToString()); + p.Add("value", value.ToString(CultureInfo.InvariantCulture)); new FormPoster(Post.BaseUrl, "/v", p, replyDelegate); } /// @@ -230,7 +231,7 @@ public static void EzCounter(string ezkey, string stat, float count, ReplyDelega Dictionary p = new Dictionary(); p.Add("ezkey", ezkey); p.Add("stat", stat); - p.Add("count", count.ToString()); + p.Add("count", count.ToString(CultureInfo.InvariantCulture)); new FormPoster(Post.BaseUrl, "/ez", p, replyDelegate); } @@ -258,7 +259,7 @@ public static void EzValue(string ezkey, string stat, float value, ReplyDelegate Dictionary p = new Dictionary(); p.Add("ezkey", ezkey); p.Add("stat", stat); - p.Add("value", value.ToString()); + p.Add("value", value.ToString(CultureInfo.InvariantCulture)); new FormPoster(Post.BaseUrl, "/ez", p, replyDelegate); }