Sign in to follow this  

C# Lists

This topic is 3728 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey, I'm trying to make a List, but I have no clue what using statement i have to include in order to create a list (List<type>) I tried using System.Collections, but i guess it isnt apart of that. can anyone help me? the reason I want to use a List is because I need a resizable container that can check if its empty and add/remove items. thanx for any help! :D

Share this post


Link to post
Share on other sites
The List<> class is in the System.Collections.Generic namespace. You'll need C# 2.0 or later to use it, which is included in Visual Studio 2005 and later.

Share this post


Link to post
Share on other sites
For older versions of .NET (1.x) there's ArrayList which will contain any object (naturally incurring an boxing and unboxing overhead for value types and increasing the number of potential bugs that could have been caught at compile time).

Share this post


Link to post
Share on other sites

This topic is 3728 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this