mirror of
https://github.com/markjprice/cs11dotnet7.git
synced 2025-12-06 05:32:03 +01:00
28 lines
691 B
C#
28 lines
691 B
C#
|
|
partial class Program
|
|||
|
|
{
|
|||
|
|
static void SectionTitle(string title)
|
|||
|
|
{
|
|||
|
|
ConsoleColor previousColor = ForegroundColor;
|
|||
|
|
ForegroundColor = ConsoleColor.Yellow;
|
|||
|
|
WriteLine("*");
|
|||
|
|
WriteLine($"* {title}");
|
|||
|
|
WriteLine("*");
|
|||
|
|
ForegroundColor = previousColor;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
static void Fail(string message)
|
|||
|
|
{
|
|||
|
|
ConsoleColor previousColor = ForegroundColor;
|
|||
|
|
ForegroundColor = ConsoleColor.Red;
|
|||
|
|
WriteLine($"Fail > {message}");
|
|||
|
|
ForegroundColor = previousColor;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
static void Info(string message)
|
|||
|
|
{
|
|||
|
|
ConsoleColor previousColor = ForegroundColor;
|
|||
|
|
ForegroundColor = ConsoleColor.Cyan;
|
|||
|
|
WriteLine($"Info > {message}");
|
|||
|
|
ForegroundColor = previousColor;
|
|||
|
|
}
|
|||
|
|
}
|