Colored Console
The following is one possible solution to this challenge.
This one involves multiple projects with their own configuration, so downloading the solutions might be valuable.
Main/Program.cs
using Helpers;
using System;
string name = ColoredConsole.Prompt("What is your name?");
ColoredConsole.WriteLine("Hello " + name, ConsoleColor.Green);
Main/Main.csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Helpers\Helpers.csproj" />
</ItemGroup>
</Project>
Helpers/ColoredConsole.cs
using System;
namespace Helpers
{
public static class ColoredConsole
{
public static string Prompt(string question)
{
Console.Write(question + " ");
Console.ForegroundColor = ConsoleColor.Cyan;
return Console.ReadLine();
}
public static void Write(string text, ConsoleColor color)
{
Console.ForegroundColor = color;
Console.Write(text);
}
public static void WriteLine(string text, ConsoleColor color)
{
Console.ForegroundColor = color;
Console.WriteLine(text);
}
}
}
Helpers/Helpers.csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
</Project>