31 lines
801 B
Plaintext
31 lines
801 B
Plaintext
include::../description-dotnet.adoc[]
|
|
|
|
include::../why-dotnet.adoc[]
|
|
|
|
include::../how-dotnet.adoc[]
|
|
|
|
=== Code examples
|
|
|
|
==== Noncompliant code example
|
|
|
|
[source,vbnet,diff-id=1,diff-type=noncompliant]
|
|
----
|
|
// Assuming we are in Windows OS and we need to get the Tokyo Time Zone.
|
|
Dim ianaTimeZone = "Asia/Tokyo"
|
|
Dim windowsTimeZone = TZConvert.IanaToWindows(ianaTimeZone)
|
|
Dim tokyoWindowsTimeZone As TimeZoneInfo = TimeZoneInfo.FindSystemTimeZoneById(windowsTimeZone)
|
|
----
|
|
|
|
==== Compliant solution
|
|
|
|
[source,vbnet,diff-id=1,diff-type=compliant]
|
|
----
|
|
// Assuming we are in Windows OS and we need to get the Tokyo Time Zone.
|
|
Dim ianaTimeZone = "Asia/Tokyo"
|
|
Dim tokyoWindowsTimeZone As TimeZoneInfo = TimeZoneInfo.FindSystemTimeZoneById(ianaTimeZone)
|
|
----
|
|
|
|
== Resources
|
|
|
|
include::../resources-dotnet.adoc[]
|