Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 197
  • 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

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