Site navigation

Which of the following is the correct way to find out the number of elements currently present in an…

In .NET's System.Collections.ArrayList, the Count property (arr.Count) returns the number of elements currently contained in the ArrayList (whereas Capacity returns the…

Choose your answer

Which of the following is the correct way to find out the number of elements currently present in an ArrayList Collection called arr?

Select one answer
Answer and explanation

Correct answer A

In .NET's System.Collections.ArrayList, the Count property (arr.Count) returns the number of elements currently contained in the ArrayList (whereas Capacity returns the number of elements the internal array can hold before resizing).

Practice for these exams

  • Rajasthan Programmer

Related question papers

Related questions in this topic