Chapter 9 Working with Data Flashcards
1
Q
The two most common System.Array properties
A
Length: The total number of elements in all dimensions.
Rank: The number of dimensions.
2
Q
The two “copy” methods of System.Array
A
Clone: does a shallow copy
CopyTo:copies the elements of the arry to another array.
3
Q
Shallow Copy and its pitfall
A
When cloning an array with reference types, the new (cloned) array will contian the same references as the original.
4
Q
System.Collections
A
ArrayList (basic)
HashTable (key/value pair)
Queue (FIFO)
SortedList (sorted by the key value)
Stack (LIFO)
5
Q
key methods of the ArrayList class
A
Add
AddRange (multiple objects)
Insert (add to a location)