c# - Why is my array being flipped? -
public const t = true; public static bool[,] massmediumhorizontal = new bool[,] { {t,t,t,t,t,t}, {t,t,t,t,t,t}, {t,t,t,t,t,t}, {t,t,t,t,t,t}, {t,t,t,t,t,t}, {t,t,t,t,t,t}, {t,t,t,t,t,t}, {t,t,t,t,t,t}, {t,t,t,t,t,t}, {t,t,t,t,t,t}, {t,t,t,t,t,t}, {t,t,t,t,t,t} };
as can see, array has width of 6 , height of 12.
when compile it, width , height flipped.
if place break point while debugging (visual studio feature) hover on variable's name, tells me size of array, , says 12x6 (width x height).
of course, if want opposite of this, make original array 12x6 , end 6x12 after compiling.
but why happen in first place? (i don't rotate ever after compiling)
thinking arrays width , height confusing matter. measurements start outer-most dimension.
your outer dimension 12, , inner 6. hence 12 x 6. it's way works.
Comments
Post a Comment