Will the following code compile (as a part of a method):
ArrayList list = new ArrayList();
list.Add(new Object()); 
list.Add(new Exception()); 
list.Add(new Random().Next(10)); 
list.Add(new ArrayList());
Get an explanation when it's available:

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
C# quizzes
Sign Up Now
or Subscribe for future quizzes