Skip to content

Instantly share code, notes, and snippets.

View renatogroffe's full-sized avatar
🎯
Focusing

Renato Groffe renatogroffe

🎯
Focusing
  • Brazil
  • 12:50 (UTC -03:00)
View GitHub Profile
using APIContagem;
using APIContagem.Middlewares;
using APIContagem.Models;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
builder.Services.AddSingleton<Contador>();
using APIContagem;
using APIContagem.Middlewares;
using APIContagem.Models;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
builder.Services.AddSingleton<Contador>();
using ConsoleAppRefReadOnly;
using System.Runtime.InteropServices;
Console.WriteLine("***** Testes com C# 12 | ref readonly parameters *****");
Console.WriteLine($"Versao do .NET em uso: {RuntimeInformation
.FrameworkDescription} - Ambiente: {Environment.MachineName}- Kernel: {Environment
.OSVersion.VersionString}");
Console.WriteLine();
int numero = 0;
namespace ConsoleAppRefReadOnly;
public class Fatorial
{
public static int Calcular(ref readonly int numero)
{
int resultado = 1;
for (int i = numero; i > 1; i--)
resultado *= i;
namespace ConsoleAppRefReadOnly;
public class Fatorial
{
public static int Calcular(in int numero)
{
int resultado = 1;
for (int i = numero; i > 1; i--)
resultado *= i;
Live Views Canal .NET Views Coding Night Temas abordados
15/11/2023 2778 279 .NET 8 + C# 12 + Injeção de Dependências + ASP.NET Core
16/11/2023 1090 159 .NET 8 + C# 12 + ASP.NET Core
17/11/2023 1006 136 Blazor + .NET 8 + C# 12 + ASP.NET Core
19/11/2023 754 145 Aspire + .NET 8 + C# 12 + ASP.NET Core
20/11/2023 827 179 MAUI + .NET 8 + ASP.NET Core
using ConsoleAppExperimentalAttribute.Helpers;
using System.Runtime.InteropServices;
Console.WriteLine("***** Testes com C# 12 | ExperimentalAttribute *****");
Console.WriteLine($"Versao do .NET em uso: {RuntimeInformation
.FrameworkDescription} - Ambiente: {Environment.MachineName}- Kernel: {Environment
.OSVersion.VersionString}");
Console.WriteLine();
#pragma warning disable MessageHelper01 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
using ConsoleAppExperimentalAttribute.Helpers;
using System.Runtime.InteropServices;
Console.WriteLine("***** Testes com C# 12 | ExperimentalAttribute *****");
Console.WriteLine($"Versao do .NET em uso: {RuntimeInformation
.FrameworkDescription} - Ambiente: {Environment.MachineName}- Kernel: {Environment
.OSVersion.VersionString}");
Console.WriteLine();
MessageHelper.ShowCurrentDateTime();
using System.Diagnostics.CodeAnalysis;
namespace ConsoleAppExperimentalAttribute.Helpers;
public static class MessageHelper
{
[Experimental(diagnosticId: "MessageHelper01")]
public static void ShowCurrentDateTime()
{
Console.WriteLine($"Executando o metodo experimental " +