Silverlight App不适用于挪威语区域 [英] Silverlight App not working for Norwegian locale

查看:73
本文介绍了Silverlight App不适用于挪威语区域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

挪威语区域设置中的时间分隔符已从":"更改为:到"。"。由于此更改,DateTime.TryParse方法无法解析具有"。"的日期字符串。作为时间分隔符,例如12.04.2016 11.15。

The time separator in Norwegian locale has been changed from ":" to ".". Due to this change the DateTime.TryParse method fails to parse the date string having "." as time seperator e.g. 12.04.2016 11.15.

在Windows窗体应用程序和Web应用程序但不是Silverlight应用程序的情况下,解析日期时间。

The date time parsing is working in case of Windows form application and Web application but not Silverlight application.

似乎Silverlight框架存在一些问题。

It seems that there is some problem with Silverlight framework.

微软是否有解决此问题的方法?

Do microsoft have any fix for this issue?

推荐答案

嗨Nilesh Mahajan,

Hi Nilesh Mahajan,

根据您的描述,我创建了一个示例Windows窗体应用程序和一个示例Silverlight应用程序。然后执行以下代码。在Windows窗体和Silverlight应用程序中,它也抛出异常,因为它不是有效的DateTime。

According to your description, I create a sample Windows Form application and a sample Silverlight application. And then execute following code. In both Windows Forms and Silverlight application, it also thrown exception about it is not a valid DateTime.

DateTime dt = DateTime.Parse("12.04.2016 11.15");

根据我的测试结果,此问题不是Silverlight Framework问题。

Based on my test result, this problem is not a Silverlight Framework problem.

最好的问候,

Weiwei

Best Regards,
Weiwei


这篇关于Silverlight App不适用于挪威语区域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆