TimeZoneInfo.TryFindSystemTimeZoneById(String, TimeZoneInfo) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Retrieves a TimeZoneInfo object by time zone name.
public:
static bool TryFindSystemTimeZoneById(System::String ^ id, [Runtime::InteropServices::Out] TimeZoneInfo ^ % timeZoneInfo);
public static bool TryFindSystemTimeZoneById (string id, out TimeZoneInfo? timeZoneInfo);
static member TryFindSystemTimeZoneById : string * TimeZoneInfo -> bool
Public Shared Function TryFindSystemTimeZoneById (id As String, ByRef timeZoneInfo As TimeZoneInfo) As Boolean
Parameters
- id
- String
The time zone name.
- timeZoneInfo
- TimeZoneInfo
When this method returns, contains the retrieved TimeZoneInfo or null
if no valid time zone was found.
Returns
true
if the TimeZoneInfo object was successfully retrieved; otherwise, false
.
Remarks
This function wraps the logic necessary to keep the private SystemTimeZones cache in working order.
Applies to
التعاون معنا على GitHub
يمكن العثور على مصدر هذا المحتوى على GitHub حيث يمكنك أيضاً إضافة مشاكل وطلبات سحب ومراجعتها. للحصول على معلومات إضافية، اطلع على دليل المساهم لدينا.