mirror of
https://github.com/markjprice/cs11dotnet7.git
synced 2025-12-06 05:32:03 +01:00
27 lines
680 B
C#
27 lines
680 B
C#
partial class Program
|
|
{
|
|
static void WriteError(string message)
|
|
{
|
|
ConsoleColor previousColor = ForegroundColor;
|
|
ForegroundColor = ConsoleColor.Red;
|
|
WriteLine($"FAIL: {message}");
|
|
ForegroundColor = previousColor;
|
|
}
|
|
|
|
static void WriteWarning(string message)
|
|
{
|
|
ConsoleColor previousColor = ForegroundColor;
|
|
ForegroundColor = ConsoleColor.DarkYellow;
|
|
WriteLine($"WARN: {message}");
|
|
ForegroundColor = previousColor;
|
|
}
|
|
|
|
static void WriteInformation(string message)
|
|
{
|
|
ConsoleColor previousColor = ForegroundColor;
|
|
ForegroundColor = ConsoleColor.Blue;
|
|
WriteLine($"INFO: {message}");
|
|
ForegroundColor = previousColor;
|
|
}
|
|
}
|