本文介绍了如何:获取时区的.NET Framework 2.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我要寻找能获取可用时区的方法。 使用.NET Framework 3.5我的方法做同样的,但我期待使用.NET Framework 2.0去取。 .NET Framework 3.5的具体code是如下:
I am looking for a method which can fetch available time zones. Using framework 3.5 I got method to do the same, but I am looking to fetch it using framework 2.0. framework 3.5 specific code is as follows;
Dim timeZones As ReadOnlyCollection(Of TimeZoneInfo) = TimeZoneInfo.GetSystemTimeZones() For Each timeZoneInfo As TimeZoneInfo In timeZones Console.WriteLine("{0}", timeZoneInfo.DisplayName) Next
在此先感谢任何形式的帮助。
Thanks in advance for any kind of help.
推荐答案我相信这篇文章包含的兼容源.NET 2.0:
I believe this article contains the source that is compatible with .NET 2.0:
HTTP://www.$c$cproject/KB/ VB / TimeZoneInfo.aspx
如果你抓住他们的源代码,你可以看看他们是如何做到 GetTimeZones 方法,其时区类。
If you grab their source you can check out how they did GetTimeZones method for their TimeZone class.
更多推荐
如何:获取时区的.NET Framework 2.0
发布评论