コレクション初期化子を使用してディクショナリを初期化する方法は以下に挙げられる2つがあります
// Addメソッドを用いての初期化 var students = new Dictionary<int, Test>() { { 1, new Test(10) }, { 2, new Test(20) }, { 3, new Test(30) }, }; // インデクサを用いての初期化 var students = new Dictionary<int, Test>() { [1] = new Test(10) }, [2] = new Test(20) }, [3] = new Test(30) }, }; private class Test { public int Value; public Test(int value) { Value = value; } }