From 0d371200dac5c67047744eb55e723489fc3ffe71 Mon Sep 17 00:00:00 2001 From: James Yeung Date: Mon, 12 Sep 2022 23:42:00 +0800 Subject: [PATCH] fix(module: message): exception casue by Invariant Globalization setting (#2697) --- components/message/MessageItem.razor.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/components/message/MessageItem.razor.cs b/components/message/MessageItem.razor.cs index 5f858e3c..3c4e9c71 100644 --- a/components/message/MessageItem.razor.cs +++ b/components/message/MessageItem.razor.cs @@ -13,11 +13,9 @@ namespace AntDesign protected const string PrefixCls = "ant-message"; - private CultureInfo _cultureInfo = new CultureInfo("en-us", false); - private string GetClassName() { - var className = $"{PrefixCls}-{Config.Type.ToString().ToLower(_cultureInfo)}"; + var className = $"{PrefixCls}-{Config.Type.ToString().ToLower(CultureInfo.InvariantCulture)}"; if (RTL) {