Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Generics vs ArrayList
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01431995
Message ID:
01432004
Views:
42
Ahh. The blind man sees. Thanks!


>The ArrayList is not strongly typed, you can add any type of object in it. You will also need to cast (unbox) the item you reference, which is a costly operation. The generic list is strongly typed and should be priviledged over the ArrayList where it apply.
>
>>I have been using bothy generic lists and array lists, but I really don't see the difference. What is the difference between:
>>
>>
>>Customer cust = new Customer();
>>ArrayList customers = new ArrayList();
>>customers.Add(cust);
>>
>>
>>and
>>
>>
>>Customer cust = new Customer();
>>List<Customer> customers2 = new List<Customer>();
>>customers2.Add(cust);
>>
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Previous
Reply
Map
View

Click here to load this message in the networking platform