**** Merged from MCS ****
[mono-project.git] / mcs / errors / cs0229.cs
blobe69c449ac9b238765cf67ef9d8261b2fa345c02a
1 // cs0229.cs: Ambiguity between `IList.Count' and `ICounter.Count (int)'
2 // Line: 30
3 using System;
5 interface IList {
6 int Count { get; set; }
9 interface ICounter {
10 void Count (int i);
13 interface IListCounter: IList, ICounter {}
16 class ListCounter : IListCounter {
17 int IList.Count {
18 get { Console.WriteLine ("int IList.Count.get"); return 1; }
19 set { Console.WriteLine ("int IList.Count.set"); }
22 void ICounter.Count (int i)
24 Console.WriteLine ("int ICounter.Count (int i)");
27 static void Main ()
29 IListCounter t = new ListCounter ();
30 t.Count (1);