-
-
Save todorok1/88f67e9f8f21bce2aa188be0e875f304 to your computer and use it in GitHub Desktop.
C#のDictionaryの宣言サンプル
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
// int型をキーに、string型を値に設定します。 | |
Dictionary<int, string> itemDict = new Dictionary<int, string>(); | |
// 通常の辞書のようにどちらもstringに。 | |
Dictionary<string, string> normalDict = new Dictionary<string, string>(); | |
// GameObjectも値にできます。 | |
Dictionary<int, GameObject> objDict = new Dictionary<int, GameObject>(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment