如何:获取时区的.NET Framework 2.0

编程入门 行业动态 更新时间:2024-10-09 12:34:37
本文介绍了如何:获取时区的.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

本文发布于:2023-11-15 19:48:07,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1597437.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:时区   NET   Framework

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!