using System;
using System.Collections.Generic;
class myClass{
public string Name { get; set; }
public myClass(){
}
}
class MainClass
{
public static void Main()
{
string[] array = new string[] { "one", "two", "three" };
IDictionary<string,myClass> col= new Dictionary<string,myClass>();
foreach (string name in array)
{
col[name] = new myClass { Name = "hahah " + name + "!"};
}
foreach(var x in col.Values)
{
Console.WriteLine(x.Name);
}
Console.WriteLine("Test");
Console.WriteLine(col["two"].Name);
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYzsKCmNsYXNzIG15Q2xhc3N7CgogICAgcHVibGljIHN0cmluZyBOYW1lIHsgZ2V0OyBzZXQ7IH0KICAgIHB1YmxpYyBteUNsYXNzKCl7CiAgICB9Cn0KCmNsYXNzIE1haW5DbGFzcwp7CgoJcHVibGljIHN0YXRpYyB2b2lkIE1haW4oKSAKCXsKCQlzdHJpbmdbXSBhcnJheSA9IG5ldyBzdHJpbmdbXSB7ICJvbmUiLCAidHdvIiwgInRocmVlIiB9OwoJCUlEaWN0aW9uYXJ5PHN0cmluZyxteUNsYXNzPiBjb2w9IG5ldyBEaWN0aW9uYXJ5PHN0cmluZyxteUNsYXNzPigpOwoJCWZvcmVhY2ggKHN0cmluZyBuYW1lIGluIGFycmF5KQoJCXsKCQkJICBjb2xbbmFtZV0gPSBuZXcgbXlDbGFzcyB7IE5hbWUgPSAiaGFoYWggIiArIG5hbWUgICsgIiEifTsKCQl9CgogCQlmb3JlYWNoKHZhciB4IGluIGNvbC5WYWx1ZXMpCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgQ29uc29sZS5Xcml0ZUxpbmUoeC5OYW1lKTsKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICBDb25zb2xlLldyaXRlTGluZSgiVGVzdCIpOwogICAgICAgICAgICAgICAgQ29uc29sZS5Xcml0ZUxpbmUoY29sWyJ0d28iXS5OYW1lKTsKCX0KfQ==