0

C# Lists

Can i define a two dimensional lists?

16th Jan 2017, 6:39 PM
Ahmad Y. Alrawi
Ahmad Y. Alrawi - avatar
1 ответ
+ 8
So, you can just Use List of lists Like so: List<List<string>> for 2d list of strings. But they all will be initializes as NULL So you need to create new inner list by yourself Then to add value to Xth list use syntax like in normal 2d arrays: myList[X].Add(someValue)
16th Jan 2017, 6:45 PM
WittyBit
WittyBit - avatar