-
-
Save todorok1/e101cc5e587a1469ed2e5adb28e33a66 to your computer and use it in GitHub Desktop.
C#の辞書にデータを登録する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// アイテムIDとアイテム名の辞書を作成します。 | |
Dictionary<int, string> itemDict = new Dictionary<int, string>(); | |
// Addメソッドでデータを追加します。 | |
itemDict.Add(1, "ポーション"); | |
itemDict.Add(2, "ハイポーション"); | |
itemDict.Add(3, "エーテル"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment