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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

System.Collections

A

ArrayList (basic)

HashTable (key/value pair)

Queue (FIFO)

SortedList (sorted by the key value)

Stack (LIFO)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

key methods of the ArrayList class

A

Add

AddRange (multiple objects)

Insert (add to a location)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly