-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy pathtrivia.cs
More file actions
109 lines (98 loc) · 2.04 KB
/
trivia.cs
File metadata and controls
109 lines (98 loc) · 2.04 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
//
// Start of trivia.cs
// Unassociated
#define DEBUG
#define DEBUG2
#undef DEBUG
using System;
using System.Collections;
using System.Collections.Generic;
#pragma warning disable 414, CS3021
#pragma checksum "comments1.cs" "{406EA660-64CF-4C82-B6F0-42D48172A799}" "ab007f1d23d9" // New checksum
class Tr1
{
static void M1()
{
#line 1 "comments1.cs"
int i; // A mapped single-line comment
int j;
#line default
char c;
#pragma warning restore
float f;
#line hidden // numbering not affected
string s;
#line 5
double d;
}
}
class Tr2
{
static void M1()
{
#region fields
int i;
#region nested
int j;
#endregion
#endregion
}
}
class Tr3
{
static void M1()
{
#nullable disable// Sets the nullable annotation and warning contexts to disabled.
#nullable enable// Sets the nullable annotation and warning contexts to enabled.
#nullable restore// Restores the nullable annotation and warning contexts to project settings.
#nullable disable annotations// Sets the nullable annotation context to disabled.
#nullable enable annotations// Sets the nullable annotation context to enabled.
#nullable restore annotations// Restores the nullable annotation context to project settings.
#nullable disable warnings// Sets the nullable warning context to disabled.
#nullable enable warnings// Sets the nullable warning context to enabled.
#nullable restore warnings// Restores the nullable warning context to project settings.
}
}
class Tr4
{
static void M1()
{
#if DEBUG
#error DEBUG is defined
var i = 0;
#if NESTED
i--;
#endif
#elif (NOTDEBUG == true) || !(TEST)
#warning NOTDEBUG is defined or TEST is not
var i = 1;
#else
var i = 2;
#endif
}
}
class Tr5
{
#if DEBUG2
static void M1()
{
}
#endif
static void M2()
{
}
public int F1
#if DEBUG2
= 10
#endif
;
public int F2 = 0;
public int P1
{
get;
#if DEBUG2
set;
#endif
}
public int P2 { get; set; }
}