Created
June 3, 2024 16:44
-
-
Save renatogroffe/100f733329525862781e54f63ccedbd3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string[] amostrasTempo = ["71.715", "71.716", "71.829", "71.830", "71.832"]; | |
foreach (var amostra in amostrasTempo) | |
{ | |
Console.WriteLine(); | |
var amostraSegundos = JsonSerializer.Deserialize<double>(amostra); | |
Console.WriteLine($"Tempo em segundos = {amostra}"); | |
Console.WriteLine($"Tempo em segundos (double) = {amostraSegundos}"); | |
var amostraTimeSpan = TimeSpan.FromSeconds(value: amostraSegundos); | |
Console.WriteLine($"Tempo em segundos (TimeSpan) = {amostraTimeSpan} | TimeSpan.FromSeconds(value)"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment