-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnotes.txt
57 lines (46 loc) · 1.63 KB
/
notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
== Console Color Control ==
Possible options for controlling console text color?
* https://msdn.microsoft.com/en-us/library/system.console.foregroundcolor(v=vs.110).aspx
using System;
public class Example
{
public static void Main()
{
if (Console.BackgroundColor == ConsoleColor.Black) {
Console.BackgroundColor = ConsoleColor.Red;
Console.ForegroundColor = ConsoleColor.Black;
Console.Clear();
}
}
}
* https://www.dotnetperls.com/console-color
using System; // <-- You need this for Console
class Program
{
static void Main()
{
//
// 1. Type "Console" and press "."
// 2. Select "BackgroundColor".
// 3. Press space and "=", then press tab.
//
Console.BackgroundColor = ConsoleColor.Blue;
Console.ForegroundColor = ConsoleColor.White;
Console.WriteLine("White on blue.");
Console.WriteLine("Another line."); // <-- This line is still white on blue.
Console.ResetColor();
}
}
== Handlers ==
void eventSource_ErrorRaised(object sender, BuildErrorEventArgs e)
{
// BuildErrorEventArgs adds LineNumber, ColumnNumber, File, amongst other parameters
string line = String.Format(": ERROR {0}({1},{2}): ", e.File, e.LineNumber, e.ColumnNumber);
WriteLineWithSenderAndMessage(line, e);
}
void eventSource_WarningRaised(object sender, BuildWarningEventArgs e)
{
// BuildWarningEventArgs adds LineNumber, ColumnNumber, File, amongst other parameters
string line = String.Format(": Warning {0}({1},{2}): ", e.File, e.LineNumber, e.ColumnNumber);
WriteLineWithSenderAndMessage(line, e);
}