संपादित करें

इसके माध्यम से साझा किया गया


TimeZoneInfo.TryConvertIanaIdToWindowsId(String, String) Method

Definition

Tries to convert an IANA time zone ID to a Windows ID.

public:
 static bool TryConvertIanaIdToWindowsId(System::String ^ ianaId, [Runtime::InteropServices::Out] System::String ^ % windowsId);
public static bool TryConvertIanaIdToWindowsId (string ianaId, out string? windowsId);
static member TryConvertIanaIdToWindowsId : string * string -> bool
Public Shared Function TryConvertIanaIdToWindowsId (ianaId As String, ByRef windowsId As String) As Boolean

Parameters

ianaId
String

The IANA time zone ID.

windowsId
String

When this method returns, contains the Windows ID that corresponds to the specified IANA ID.

Returns

true if the ID conversion succeeded, false otherwise.

Remarks

This API is exclusively supported on .NET 6 and later versions, and only when the application utilizes the ICU library. However, in .NET, the ICU library is not always used by default, particularly in the following scenarios:

If the application is running on a Windows OS version that lacks the ICU library, it has the option to opt-in and enable the usage of the ICU library through the app-local ICU feature.

Applies to