|
-
May 12th, 2009, 01:11 PM
#16
Re: Array Questions
An array is a basic structure (usually found in all languages), which provides a mechanism to address a (consecutive) sequence of memory locations by its index value. All the elements in an array are of same data type i.e. they occupy same memory size. Usually accessing an element is very fast since the memory blocks are of equal size. So we just multiply the index value with memory size and we get the address of the element. However, adding/inserting/removing elements is a cumbersome operation.
A List is a specialized .NET class that can be used to store elements more or less like arrays. But it has many advanced features. You can access elements by their index values just like arrays. And adding/inserting/deleting elements is just a matter of a simple function call to the user, besides many more advanced features.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|