Make StringComparer.Create throw ArgumentNullException (#26570)
[mono-project.git] / mcs / tests / gtest-111.cs
blob867d00518546d8a1a66f1c9683c0e1745c95adad
1 using System;
3 public struct KeyValuePair<K,V>
5 public K key;
6 public V value;
8 public KeyValuePair(K k, V v) { key = k; value = v; }
10 public KeyValuePair(K k) { key = k; value = default(V); }
13 public class Collection<T>
15 public readonly T Item;
17 public Collection (T item)
19 this.Item = item;
22 public void Find (ref T item)
24 item = Item;
28 class X
30 public static int Main ()
32 KeyValuePair<int,long> p = new KeyValuePair<int,long> (3);
33 KeyValuePair<int,long> q = new KeyValuePair<int,long> (5, 9);
35 Collection<KeyValuePair<int,long>> c = new Collection<KeyValuePair<int,long>> (q);
36 c.Find (ref p);
38 if (p.key != 5)
39 return 1;
40 if (p.value != 9)
41 return 2;
43 return 0;