Quiz Yourself: Collections
Test your knowledge of .NET collection types.
We'll cover the following...
We'll cover the following...
Collections Quiz
1.
Consider the following code:
var messages = new ArrayList();
messages.Add("Hello World!");
messages.Add("Good bye!");
foreach (var message in messages)
{
Console.WriteLine(message);
}
Which type of the message
variable?
A.
string
B.
object
C.
int
D.
string[]
1 / 4