Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mono / tests / hash-table.cs
1 using System.Collections;
2
3 namespace Test {
4         public class Test {
5                 public static int Main () {
6                         string[] names = {
7                                 "one", "two", "three", "four"
8                         };
9                         Hashtable hash = new Hashtable ();
10
11                         for (int i=0; i < names.Length; ++i) {
12                                 hash.Add (names [i], i);
13                         }
14                         if ((int)hash ["one"] != 0)
15                                 return 1;
16                         if ((int)hash ["two"] != 1)
17                                 return 2;
18                         if ((int)hash ["three"] != 2)
19                                 return 3;
20                         if ((int)hash ["four"] != 3)
21                                 return 4;
22                         if (hash.Contains("urka"))
23                                 return 5;
24                         return 0;
25                 }
26         }
27 }