Skip to content

Instantly share code, notes, and snippets.

@renatogroffe
Created November 18, 2023 08:06
Show Gist options
  • Save renatogroffe/397d377446982d96f1d3d95fc164ff3f to your computer and use it in GitHub Desktop.
Save renatogroffe/397d377446982d96f1d3d95fc164ff3f to your computer and use it in GitHub Desktop.
using System.Diagnostics.CodeAnalysis;
namespace ConsoleAppExperimentalAttribute.Helpers;
public static class MessageHelper
{
[Experimental(diagnosticId: "MessageHelper01")]
public static void ShowCurrentDateTime()
{
Console.WriteLine($"Executando o metodo experimental " +
$"{nameof(MessageHelper)}.{nameof(ShowCurrentDateTime)}");
var now = DateTime.UtcNow.AddHours(-3);
Console.WriteLine($"Data: {now:dd} de {now:MMMM} de {now:yyyy}");
Console.WriteLine($"Horario atual: {now:HH:mm:ss}");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment