Solved

System.Collections.Generic.List<>  Array

Posted on 2006-06-21
3
193 Views
Last Modified: 2010-04-16
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
Comment
Question by:axnst2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 25

Expert Comment

by:dstanley9
ID: 16952917
What's the compiler error?
0
 
LVL 25

Accepted Solution

by:
dstanley9 earned 500 total points
ID: 16952933
This compiles fine for me:

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

Author Comment

by:axnst2
ID: 16953505
Thanks a bunch, that was it!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question