-// cs0467.cs: Ambiguity between method `ICounter.Count(int)' and non-method `IList.Count'. Using method `ICounter.Count(int)'
-// Line: 30\r
-// Compiler options: -warnaserror -warn:2\r
+// CS0467: Ambiguity between method `IMethod.Count()' and invocable non-method `IList.Count'. Using method group
+// Line: 27
+// Compiler options: -warn:2 -warnaserror
using System;
-interface IList \r
+delegate void D (int i);
+
+interface IList
{
- int Count { get; set; }
+ D Count { get; }
}
-interface ICounter\r
-{\r
- void Count (int i);
+interface IMethod
+{
+ int Count ();
}
-\r
-interface IEx\r
-{\r
- void Count (params int[] i);\r
-}\r
-interface IListCounter: IEx, IList, ICounter\r
-{\r
+interface IListCounter: IList, IMethod
+{
}
-class Test\r
+class Test
{
static void Foo (IListCounter t)
{
- t.Count (1);
+ t.Count ();
}
-}
\ No newline at end of file
+}