• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 198
  • Last Modified:

System.Collections.Generic.List<> Array

Hi Experts,

   Is it possible to have an array of System.Collections.Generic.List<> ?  If so, how do you declare it?

   Here is my list:

          public static List<myStructure> myList = new List<myStructure>();

    I tried this:

          public static List<myStructure> [] myList = new List<myStructure>() [2];

    The compiler didn't like that much!

Thanks,
axnst2
0
axnst2
Asked:
axnst2
  • 2
1 Solution
 
dstanley9Commented:
What's the compiler error?
0
 
dstanley9Commented:
This compiles fine for me:

public static List<myStructure>[] myList = new List<myStructure>[2];
0
 
axnst2Author Commented:
Thanks a bunch, that was it!
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now