-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy pathfields.cs
More file actions
103 lines (79 loc) · 1.75 KB
/
Copy pathfields.cs
File metadata and controls
103 lines (79 loc) · 1.75 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
using System;
using System.IO;
using System.Collections.Generic;
namespace Fields
{
class A
{
public static int X = 1, Y, Z = 100;
}
public class B
{
public static int X = 1;
public static int Y;
public static int Z = 100;
}
public class C<V>
{
static int count = 0;
public C() { count++; }
public static int Count { get { return count; } }
}
public class Application
{
public static volatile bool finished;
static double x = Math.Sqrt(2.0);
int i = 100;
string s = "Hello";
void Main()
{
Decimal d = Decimal.MaxValue;
C<int> x1 = new C<int>();
Console.WriteLine(C<int>.Count);
C<double> x2 = new C<double>();
Console.WriteLine(C<int>.Count);
}
}
public class Color
{
public static readonly Color Black = new Color(0, 0, 0);
public static readonly Color White = new Color(255, 255, 255);
public Color(byte r, byte g, byte b) { }
}
public class TestBindings
{
static int a = b + 1;
static int b = a + 1;
}
}
namespace Constants
{
public class A
{
public const int X = B.Z + 1;
public const int Y = 10;
}
public class B
{
public const int Z = A.Y + 1;
}
public class C
{
public const int Foo = 1;
public long? x;
public C()
{
x = Foo;
dynamic dyn = Foo;
D d = Foo;
C c = new C { x = Foo };
}
}
public class D
{
public D(int d)
{
}
static public implicit operator D(int d) { return new D(d); }
}
}