using System; using ConsoleExtClass; namespace ConsoleColorfulDemo { /// <summary> /// Nuget—ConsoleExtClass给控制台添加颜色 /// https://www.cnblogs.com/cvol/p/14777539.html /// Nuget——ConsoleExtClass /// LDH @ 2021-9-27 /// </summary> internal class Program { private static void Main() { Console.Title = "Console 控制台添加颜色 Nuget版"; UseConsoleColor(); Console.ReadKey(); } private static void UseConsoleColor() { ConsoleExt.InfoLine("这是InfoLine"); ConsoleExt.ErrorLine("这是ErrorLine"); ConsoleExt.LogLine("这是LogLine"); ConsoleExt.WarnLine("这是WarnLine"); ConsoleExt.WriteLine("这是WriteLine", ConsoleColor.White, true); } } }