Curioustab
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Take Free Test
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Take Free Test
Collection Classes Questions
Hashtable in .NET: choose the correct combined statement about its characteristics.
C#.NET Stack (non-generic): is the following mixed-type Push() usage valid? Stack st = new Stack(); st.Push("hello"); st.Push(8.2); st.Push(5); st.Push('b'); st.Push(true);
ArrayList in .NET: how do you get the current number of elements stored?
Key-based I/O in .NET collections: which listed collections perform input/output based on a key?
Which statements about the System.Collections.Stack collection are correct?
C#.NET — ArrayList and IEnumerable/IEnumerator: identify the true statements about enumeration, thread-safety, and nested (inner) enumerator classes. Statements: 1) The ArrayList class contains a nested enumerator class that implements IEnumerator. 2) An ArrayList collection cannot be accessed safely by multiple threads simultaneously (it is not synchronized by default). 3) The nested enumerator class of ArrayList can access members of the outer ArrayList class. 4) To access members of ArrayList from the nested class, it is necessary to pass a reference of the outer ArrayList to it. 5) Enumerators of ArrayList can directly manipulate (modify) the underlying array.
Framework Class Library (FCL) collections — pick the correct statement about performance and mutability of elements stored in collection classes.
ArrayList capacity growth — if Capacity is 4, what is the capacity after adding the 5th element?
System.Collections — which of the following is NOT an interface defined in this namespace?
Index-based Input/Output — in which of the following .NET collections are elements accessed by index?
Ordered collection classes — which choices represent ordered collections in .NET?
Hashtable — how do you check if a specific state name (key) like "Kerala" exists in the table of state→capital entries?
Queue enumeration — choose the correct code to access all elements of a System.Collections.Queue instance.
Stack enumeration — choose the correct code to access all elements of a System.Collections.Stack instance.
Hashtable nullability rule — can a key be null and can a value be null?
In .NET, an ArrayList is being enumerated by four threads at the same time. How many independent enumerator instances will exist concurrently for that single ArrayList object?