我们如何通过C#中的contry名称找到TimeZone。 [英] How can we find TimeZone by contry name in C#.
本文介绍了我们如何通过C#中的contry名称找到TimeZone。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我们如何在C#中通过contry名称找到TimeZone。
How can we find TimeZone by contry name in C#.
推荐答案
Google是你的朋友:好好经常拜访他。他可以比在这里发布问题更快地回答问题......
快速搜索 使用您的主题作为搜索词 提供了超过50,000个结果: Google [ ^ ]
将来,请尝试在自己最基础的研究,而不是浪费你的时间或我们的时间。
Google is your friend: Be nice and visit him often. He can answer questions a lot more quickly than posting them here...
A very quick search using your subject as the search term gave over 50,000 results: Google[^]
In future, please try to do at least basic research yourself, and not waste your time or ours.
var zones = from tz in TimeZoneInfo.GetSystemTimeZones()其中tz.Id =xxx选择tz;
将xxx替换为您想要的时区......:)
var zones = from tz in TimeZoneInfo.GetSystemTimeZones() where tz.Id = "xxx" select tz;
Replace "xxx" with your desired timezone... :)
我认为这将有助于您:
按国家/地区获取时区和地区 [ ^ ]
这篇关于我们如何通过C#中的contry名称找到TimeZone。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文