TimeZoneInfo.TryFindSystemTimeZoneById(String, TimeZoneInfo) Metod

Definition

Hämtar ett TimeZoneInfo objekt efter tidszonsnamn.

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

Parametrar

id
String

Tidszonens namn.

timeZoneInfo
TimeZoneInfo

När den här metoden returneras innehåller den hämtade TimeZoneInfo eller null om ingen giltig tidszon hittades.

Returer

trueom objektet TimeZoneInfo har hämtats, annars . false

Kommentarer

Den här funktionen omsluter den logik som krävs för att hålla den privata SystemTimeZones-cachen i fungerande ordning.

Gäller för