Skip to content

Instantly share code, notes, and snippets.

@todorok1
Created November 3, 2020 06:00
Show Gist options
  • Save todorok1/88f67e9f8f21bce2aa188be0e875f304 to your computer and use it in GitHub Desktop.
Save todorok1/88f67e9f8f21bce2aa188be0e875f304 to your computer and use it in GitHub Desktop.
C#のDictionaryの宣言サンプル
// 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