blob: 0af8e83ff7ed6ed503a788a2a76bdca5182872e6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
// CS0200: Property or indexer `A.Counter' cannot be assigned to (it is read-only)
// Line: 9
class Program
{
static void Main()
{
A a = new A();
a.Counter++;
}
}
class A {
private int? _counter;
public int? Counter {
get { return _counter; }
}
}
|