C#でDictionaryにデータを登録する
// 宣言時に直接セットすることもできます。 | |
Dictionary<int, string> itemDict = new Dictionary<int, string>() | |
{ | |
{1, "ポーション"}, | |
{2, "ハイポーション"}, | |
{3, "エーテル"} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment