blob: 918df4a8a208e3522b845b8ae412766bf8a4a20d (
plain)
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
|
// CS0612: `E.GetEnumerator()' is obsolete
// Line: 22
// Compiler options: -warnaserror
using System.Collections;
using System;
class E : IEnumerable
{
[Obsolete]
public IEnumerator GetEnumerator ()
{
throw new System.NotImplementedException ();
}
}
class C
{
public static void Main ()
{
var e = new E ();
foreach (var entry in e) {
}
}
}
|