   2D Array C# need some help
  I created a simpe 2d array to plot out a map of textures   const int MapWidth = 20; //in tiles not pixels   const int MapHeight = 20; //in tiles not pixels   int[,] Map = new int[MapHeight, MapWidth]   {   { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},   { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},  { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},  { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},  { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},  { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},  { 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},  { 0, 0, 1, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2, 0, 0, 0, 0, 0},  { 0, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 2, 0, 0, 0, 0},  { 0, 0, 1, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 3, 3, 2, 0, 0, 0},  { 0, 0, 1, 2, 2, 2, 3, 3, 4, 3, 3, 3, 3, 4, 4, 3, 3, 2, 2, 2},  { 0, 0, 0, 1, 2, 2, 3, 3, 4, 3, 3, 3, 3, 3, 4, 4, 3, 3, 3, 2},  { 0, 0, 0, 1, 2, 3, 3, 3, 4, 4, 4, 3, 3, 3, 3, 4, 4, 4, 3, 3},  { 0, 0, 0, 1, 2, 3, 3, 4, 4, 4, 4, 3, 3, 3, 3, 3, 4, 4, 4, 4},  { 0, 0, 0, 1, 2, 3, 3, 4, 4, 4, 4, 3, 3, 3, 3, 3, 4, 4, 4, 4},  { 0, 0, 0, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4},  { 0, 0, 0, 1, 2, 3, 3, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4},  { 0, 0, 0, 1, 2, 3, 3, 2, 1, 1, 1, 1, 2, 3, 3, 3, 3, 4, 4, 4},  { 0, 0, 0, 0, 1, 2, 2, 1, 0, 0, 0, 1, 2, 3, 3, 4, 4, 4, 4, 4},  { 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 2, 3, 4, 4, 4, 4, 4, 4},   };   Texture2D[] MapTiles = new Texture2D[5];How to I return the number located at Map[15,18]... hint its 3I've tried Map.Getvalue(15,18); but it returns as an object = I need the simple integer. If you count the columns to 15, then go down the rows to 18, the intersecting value is 3. Is there are way to return this???   
  Cast it to an int:(int)Map.GetValue(15,18)or just index it directly:Map[15,18]Also, array indices work the other way: the first index selects the one-dimensional array, and the second selects the element within that array. Therefore, Map[15,18] is actually 4.(first post woo~)   ;  the pos on 15, 18 is a 4. System.Diagnostics.Debug.WriteLine(Map[15, 18].GetType().Name + " value = " + Map[15, 18]);and is an Int32.EDIT: ;p beaten   