I do not know how to declare the attribute of the matrix without dimensioning it, since the dimension would be entered by keyboard.
I do not know how to declare the attribute of the matrix without dimensioning it, since the dimension would be entered by keyboard.
What could be done is the following:
public int[,] cargarMatriz(input1, input2) {
int[,] matriz = new int[input1, input2];
return matriz;
}
Once the user enters the data, there would be a button that executes the function cargaMatriz and this would be the result of your problem.
Greetings.
Using static structures, it is not possible. A solution could be knowing the limits of the entries to be handled, in that case you would create a matrix with the dimensions of said limits, and you would only manage the rows and columns up to the inputs that the user provides. The problem with this solution is that it can waste a large amount of memory.
The other solution is to use dynamic structures. In C # there are several that could adapt to the behavior you need, or make your own using nodes.