Created
November 13, 2024 16:35
-
-
Save renatogroffe/b80e267143c4aa9d197f5bafbc09cc3b 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
using System.Diagnostics; | |
using System.Runtime.InteropServices; | |
Console.WriteLine("***** Testes com .NET 9 | Melhorias em Debug.Assert *****"); | |
Console.WriteLine($"Versao do .NET em uso: {RuntimeInformation | |
.FrameworkDescription} - Ambiente: {Environment.MachineName} - Kernel: {Environment | |
.OSVersion.VersionString}"); | |
Console.WriteLine(); | |
Console.WriteLine("Informe um numero inteiro positivo:"); | |
var input = Console.ReadLine(); | |
Debug.Assert(int.TryParse(input, out var number) && number > 0); | |
Console.WriteLine(); | |
Console.WriteLine("Debug.Assert() nao produziu falha..."); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment