Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ TryConvertIanaIdToWindowsId() [2/2]

static unsafe bool System.TimeZoneInfo.TryConvertIanaIdToWindowsId ( string ianaId,
bool allocate,
out string windowsId )
inlinestaticprivate

Definition at line 2282 of file TimeZoneInfo.cs.

2283 {
2285 {
2286 windowsId = null;
2287 return false;
2288 }
2289 foreach (char c in ianaId)
2290 {
2291 if (c == '\\' || c == '\n' || c == '\r')
2292 {
2293 windowsId = null;
2294 return false;
2295 }
2296 }
2297 char* ptr = stackalloc char[100];
2299 if (num > 0)
2300 {
2301 windowsId = (allocate ? new string(ptr, 0, num) : null);
2302 return true;
2303 }
2304 windowsId = null;
2305 return false;
2306 }
static unsafe int IanaIdToWindowsId(string ianaId, char *windowsId, int windowsIdLength)

References Interop.Globalization.IanaIdToWindowsId(), System.Globalization.GlobalizationMode.Invariant, and System.Globalization.GlobalizationMode.UseNls.