Quick and simple Dictionary initialization question

Right now I'm doing some personal code exercises and want to make a Dictionary, which I've done, but was wondering if there's a way to condense it into less lines.

string hex = "Hexagon1"; int[] hexPos = {0, 0}; Dictionary<string, int[]> board = new Dictionary<string, int[]>(); board.Add(hex, hexPos); 

very new to programming, thanks guys

by skyy0731 via /r/csharp

Leave a Reply