S
S
sid3r2014-06-10 16:48:02
Arrays
sid3r, 2014-06-10 16:48:02

How to correctly allocate memory for a two-dimensional array C#

Good day, you are more likely to read one of the dumbest questions, at least once think " what a teapot ", but I had to ask it in order to save myself some nerves.
So, I used this kind of memory allocation for an array in C#:
int[] array = new int[100];
It works.
But there was a need for a two-dimensional array.
I realized right away that I don’t know how to do it right, I tried the options from Google search, it didn’t work out.
Actually, I ask you to write how to allocate memory in C #, for a two-dimensional array of type float, with a limited size. I also ask the uncles not to throw books on C #.
PS Why doesn't it work like that? (I see this as the most logical outwardly way)
float[][] darray = new float[640][480];

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vit, 2014-06-10
@fornit1917

The first line in Google is
msdn.microsoft.com/ru-ru/library/2yd9wwz4.aspx
msdn.microsoft.com/ru-ru/library/2s05feca.aspx

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question