Inicializar una array 2d de grandes dimensiones 10 x 10

Hi! I know how to declare a 2d array. The problem I face is double:

  1. how to set the dimensions of my array, which I want it to be 10 rows x 10 colums?
  2. How do I initialize the 10x10 array so that I can filled it with data from a data table I have from web scrapping? It seems that the array does not accept data if I have not initialized it when I first created it, and I do not know how to do it.

Can anyone help me? I am also Spanish speaker, so Spanish answers are also welcomed. Thank you very much.

César

Thank you very much.

@ccrespo9669
welcome to the forum

have a first look here:

also give a try on:
Variable and its default value:

result:
grafik

Hi Peter! Thank you very much for your quick answer.

The problem is that my 2d array is much larger than 10 rows and 10 columns, I just used that figures to ilustrate a big 2d array. So, I cannot go manually establishing the initial values for all rows in my matrix.

Also, the other reference you gave me, is very rare to me (maybe I do not understand the code because I am new to Uipath) but triplets like (10,11,12), (20,21,22) and, (30,31,33) could be useful for a 3d array (coordinate X, coordinate Y, coordinate Z) of the matrix, but he has declared a Int array, this is, a 2d (X,Y) matrix, so it should not work, right?

So, is there an automatic way to initialize a 2d array with 30 rows and 45 columns?

Could anyone help me? Thank you very much in advance for your kindness.

Cesar

@ccrespo9669
thanks for your feedback.

the forum is about learning. So it is recommended to have a look to concepts / techniques aside an original case as well to learn the basics and getting through to different options.

Doing an init of 30x45 Array it will work as similar as with the given statement:
grafik

And is about:
Enumerable.Repeat(new String(DimensionOfInnerArray-1){},NoOfOuterArrayItems).toArray

Reference:

Thank you very much. I will look into this document you suggest.

Thanks again.

César