Matrix

P

piotrek

Hi
How to declare a matrix in C#.
Iam after C++ course and there it was sth like: float a[n][n];
PK
 
L

Lebesgue

float[n][n] arr; which is jagged array or float[n, n] arr; which is
multidimensional array.
to access the elements
float foo = arr[7][13] = 5f;

OR

float foo = arr[7, 13] = 5f;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top