+ 3

Can I use the List<T> as a multiple array in C#? or How to create dynamically growing array in C# or C++

23rd Apr 2020, 5:51 AM
Farrukh Yuldoshev
Farrukh Yuldoshev - avatar
5 Respostas
+ 1
Who can reply???!
23rd Apr 2020, 1:30 PM
Farrukh Yuldoshev
Farrukh Yuldoshev - avatar
+ 1
Hello, There are some solutions 1- you can have list<List<T>> both lists can grow 2- create a class has 2 properties one is T(generic) and the other is int the int property is index of your nested array
27th Apr 2020, 6:56 AM
Ali pishkari
Ali pishkari - avatar
0
Do you mean Multidimensional Array? example of multi dimensional Array : int[, ,] array1 = new int[4, 2, 3];
26th Apr 2020, 9:33 AM
Kartik Misra
Kartik Misra - avatar
0
I knew multi dimensional Array. I need growning array for example: int[,] arr=new int[2,3]; arr[3,1]=2; // But index out of range It works like vectors
26th Apr 2020, 11:45 AM
Farrukh Yuldoshev
Farrukh Yuldoshev - avatar
0
Can you send me example about this in C# or C++ If you can in C# send please... Because I have not used Lists yet.
27th Apr 2020, 7:26 AM
Farrukh Yuldoshev
Farrukh Yuldoshev - avatar