Thursday, March 18, 2010

Should I use an ArrayList or IList

Programmer Question

Im using the .NET framework 1.1 and Im hoping someone could help me implement a dynamic array of objects?



A watered-down example of the object I wish use is below.



Class CarObj
{
public string CarName;
public string CarYear;
}


Should I use an ArrayList or do you think it would be better to make a CarList class to implement an IList interface? Is there a performance benefit for one over another?



Find the answer here

No comments:

Post a Comment

LinkWithin

Related Posts with Thumbnails