[bcl] Update BCL Linked Size
[mono-project.git] / mcs / tests / test-dictinit-01.cs
blob1944ae8c4a9b6383c44a858458d1dea0ec7625b2
1 using System;
2 using System.Collections.Generic;
4 class Program
6 static int Main ()
8 var c1 = new C {
9 ["aaa"] = 12,
12 if (c1.Dict ["aaa"] != 12)
13 return 1;
15 var c2 = new C {
16 ["a1"] = 5,
17 ["a2"] = 10,
18 Value = 20,
21 if (c2.Dict ["a1"] != 5)
22 return 2;
24 if (c2.Dict ["a2"] != 10)
25 return 3;
27 if (c2.Value != 20)
28 return 4;
30 return 0;
35 class C
37 public Dictionary<string, int> Dict = new Dictionary<string, int> ();
39 public int Value;
41 public int this [string arg] {
42 get {
43 return Dict [arg];
45 set {
46 Dict [arg] = value;