add ISafeSerializationData
[mcs.git] / tests / gtest-486.cs
blob20118125af3860ac16687f3158619fa5d3511a4d
1 using System;
2 using System.Collections.Generic;
4 interface IMyCollection<T> : ICollection<T> {
8 class MyCollection<T> : IMyCollection<T> {
10 public void AddRange(IMyCollection<T> items) {
13 public void AddRange(IEnumerable<T> items) {
16 public int Count { get { return 0; } }
18 public bool IsReadOnly { get { return false; } }
20 public void Add(T item) { }
22 public void Clear() { }
24 public bool Contains(T item) { return false; }
26 public void CopyTo(T[] a, int i) { }
28 public bool Remove(T item) { return false; }
30 public IEnumerator<T> GetEnumerator() { return null; }
32 System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { return null; }
36 class P {
38 static protected MyCollection<String> foo = new MyCollection<String>();
40 static protected MyCollection<String> bar = new MyCollection<String>();
42 static public MyCollection<String> IgnoreTokens {
43 get {
44 if (foo.Count == 0)
45 foo.AddRange(bar); // false error on Mono 2.0 and 2.4: The call is ambiguous between...
46 return foo;
50 public static void Main()