-// CS0278: `Testing.IMixedEnumerable' contains ambiguous implementation of `enumerable' pattern. Method `Testing.ICustomEnumerable.GetEnumerator()' is ambiguous with method `System.Collections.IEnumerable.GetEnumerator()'\r
-// Line: 28\r
-// Compiler options: -warnaserror -warn:2\r
-\r
-using System;\r
-using System.Collections;\r
-\r
-namespace Testing {\r
- interface ICustomEnumerable {\r
- IEnumerator GetEnumerator();\r
- }\r
-\r
- interface IMixedEnumerable : IEnumerable, ICustomEnumerable {}\r
-\r
- class TestCollection : IMixedEnumerable {\r
- IEnumerator IEnumerable.GetEnumerator() {\r
- return null;\r
- }\r
-\r
- IEnumerator ICustomEnumerable.GetEnumerator() {\r
- return null;\r
- }\r
- }\r
-\r
- class Test {\r
- public static void Main(string[] args) {\r
- IMixedEnumerable c = new TestCollection();\r
- foreach(object o in c) {}\r
- }\r
- }\r
-}
\ No newline at end of file
+// CS0278: `Testing.IMixedEnumerable' contains ambiguous implementation of `enumerable' pattern. Method `System.Collections.IEnumerable.GetEnumerator()' is ambiguous with method `Testing.ICustomEnumerable.GetEnumerator()'
+// Line: 28
+// Compiler options: -warnaserror -warn:2
+
+using System;
+using System.Collections;
+
+namespace Testing {
+ interface ICustomEnumerable {
+ IEnumerator GetEnumerator();
+ }
+
+ interface IMixedEnumerable : IEnumerable, ICustomEnumerable {}
+
+ class TestCollection : IMixedEnumerable {
+ IEnumerator IEnumerable.GetEnumerator() {
+ return null;
+ }
+
+ IEnumerator ICustomEnumerable.GetEnumerator() {
+ return null;
+ }
+ }
+
+ class Test {
+ public static void Main(string[] args) {
+ IMixedEnumerable c = new TestCollection();
+ foreach(object o in c) {}
+ }
+ }
+}