* roottypes.cs: Rename from tree.cs.
[mono.git] / mcs / errors / cs0229-2.cs
1 // cs0229.cs: Ambiguity between `IList.Count' and `ICounter.Count (int)'
2 // Line: 30
3 using System;
4
5 interface IList {
6         int Count { get; set; }
7 }
8
9 interface ICounter {
10         void Count (int i);
11 }
12
13 interface IListCounter: IList, ICounter {}
14
15
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"); }
20         }
21         
22         void ICounter.Count (int i)
23         {
24                 Console.WriteLine ("int ICounter.Count (int i)");
25         }
26         
27         static void Main ()
28         {
29                 IListCounter t = new ListCounter ();
30                 t.Count = 1;
31         }
32 }