linux-packaging-mono/mcs/tests/test-dictinit-05.cs

23 lines
277 B
C#
Raw Normal View History

using System.Collections.Generic;
class A {
public A ()
{
Info = new Dictionary<string, int>();
}
public Dictionary<string, int> Info { get; set; }
}
class X
{
public static void Main ()
{
var x = new A () {
Info = {
["x"] = 1,
["y"] = 2
}
};
}
}