Skip to content

Instantly share code, notes, and snippets.

@renatogroffe
Created January 6, 2025 15:19
Show Gist options
  • Save renatogroffe/409eb2d609a786527a9005d2dcab153f to your computer and use it in GitHub Desktop.
Save renatogroffe/409eb2d609a786527a9005d2dcab153f to your computer and use it in GitHub Desktop.
using ConsoleAppOverloadResolution.Tests;
using System.Runtime.InteropServices;
Console.WriteLine("***** Testes com .NET 9 + C# 13 | Overload Resolution *****");
Console.WriteLine($"Versao do .NET em uso: {RuntimeInformation
.FrameworkDescription} - Ambiente: {Environment.MachineName} - Kernel: {Environment
.OSVersion.VersionString}");
Console.WriteLine();
var arrayTecnologias = new string[] { "C#", ".NET", "ASP.NET Core" };
ReadOnlySpan<string?> spanTecnologias = ["Docker", "Kubernetes", "Linux"];
List<string> listTecnologia = [ "SQL Server", "Redis", "PostgreSQL" ];
OverloadResolutionTester.PrintItems(arrayTecnologias);
OverloadResolutionTester.PrintItems(listTecnologia);
OverloadResolutionTester.PrintItems("Visual Studio Code", "Visual Studio 2022", "Rider");
OverloadResolutionTester.PrintItems(spanTecnologias);
Console.WriteLine();
OverloadResolutionPriorityTester.PrintItems(arrayTecnologias);
OverloadResolutionPriorityTester.PrintItems(listTecnologia);
OverloadResolutionPriorityTester.PrintItems("Visual Studio Code", "Visual Studio 2022", "Rider");
OverloadResolutionPriorityTester.PrintItems(spanTecnologias);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment