Professional Documents
Culture Documents
When we have to work with arrays and matrices or any multidimensional array, the first thing
what we need to do is take control of rows (columns). This is not very complicated in the Console but in
windows forms we need to create a field for each value, doing this we cannot do right thing because the
number of rows and columns can be differently and depends from N - Rows or M - Columns, for any new
N or M the number of Rows(columns) will be changed. In console we can handle the rows and columns
using the new line and spaces for each element whatever array or matrices elements.
However the basic is in that to create and range the textboxes and look typically like two
dimensional array.
int b = merlokacionin.Y;//boshti i y
if ((textBox1.Text == "") || (textBox2.Text == ""))
MessageBox.Show(" To create a Matrices you need to give up
the numbers of columns and
rows.,"opps",MessageBoxButtons.OK,MessageBoxIcon.Error);
else
{
n = Convert.ToInt32(textBox1.Text);// Take the value N -Rows
m = Convert.ToInt32(textBox2.Text);// Take the valu M-Columns
}
int i, j;
int[,] Matrica;
this.Controls.Add(textbox[i, j]);
}
After this we can manipulate with matrices making it to find the minimum the maximum or sorting the
matrices with bubble sort , select sort or any other operation with matrices and arrays. All this using a
values in Textboxes.