Quiz Yourself: Collections
Test your knowledge of .NET collection types.
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[]
Question 1 of 40 attempted
Access this course and 1400+ top-rated courses and projects.