Nested Lists???

.net , csharp Romania
  • 12 years ago
    Is it possible to create nested lists using .NET generics? I mean something equivalent to the following Python code: nested_list = [ [[1], [2], [3,4,5]], [Devil, [7,8,9], [10,11]] ] i.e. i want to create and manipulate a list of lists of lists of integers.
  • 12 years ago

     Yes, I think you can. If you are using VS.NET 2005 try this.

    VB.NET Code: Dim listLevel1 As New List(Of List(Of List(Of Integer)))

    C# Code: List<List<List<int>>> listLevel1; 


Post a reply

Enter your message below

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“A computer lets you make more mistakes faster than any other invention in human history, with the possible exceptions of handguns and tequila” - Mitch Ratcliffe