Which collection type should you use?

You are developing an application that includes a class named Order. The application will store a
collection of Order objects.
The collection must meet the following requirements:
Use strongly typed members.
Process Order objects in first-in-first-out order.
Store values for each Order object.
Use zero-based indices.
You need to use a collection type that meets the requirements.
Which collection type should you use?

You are developing an application that includes a class named Order. The application will store a
collection of Order objects.
The collection must meet the following requirements:
Use strongly typed members.
Process Order objects in first-in-first-out order.
Store values for each Order object.
Use zero-based indices.
You need to use a collection type that meets the requirements.
Which collection type should you use?

A.
Queue<T>

B.
SortedList

C.
LinkedList<T>

D.
HashTable

E.
Array<T>

Explanation:
Queues are useful for storing messages in the order they were received for sequential processing.
Objects stored in a Queue<T> are inserted at one end and removed from the other.
http://msdn.microsoft.com/en-us/library/7977ey2c.aspx



Leave a Reply 7

Your email address will not be published. Required fields are marked *


caret

caret

Spam link

erdi

erdi

thanks.
I did not click the link at all.

s_24

s_24

Big thank you to this site and all the guys commenting on each of these questions. I passed because of all of you.

s_24

s_24

Also A is correct