Jump to content
  • Advertisement
Sign in to follow this  
NUCLEAR RABBIT

C# Lists

This topic is 3886 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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!