Console.Write() is not unified and generic for all data type. It needs custom code to print various types of object like List , Complex Object , Dicttinary etc.
Printr simplifies it !
Step 1 : Include the nuget pachage from here - https://www.nuget.org/packages/Printr/
using static Printmaster.Printr;
using System; using static Printmaster.Printr;
//Print numbers
Print(1,2,3);
//Print mixed data type
Print(1,true, false);
//Print List
Print(new List<string> { "Item1" , "Item2" });
//Print Object
var person = new { Name = "John", Age = 30 };
Print(person);
//Print 2D Array / Matrix
int[,] matrix =
{
{ 1, 2, 3 },
{ 4, 5, 6 },
{ 7, 8, 9 }
};
Print(matrix);