Skip to content

Instantly share code, notes, and snippets.

@todorok1
Created November 3, 2020 06:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save todorok1/535dad4008ed1322023f05d12bea57a4 to your computer and use it in GitHub Desktop.
Save todorok1/535dad4008ed1322023f05d12bea57a4 to your computer and use it in GitHub Desktop.
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