C#Part2 MCQ Retest
C#Part2 MCQ Retest
Marks: 20
Duration: 30mins
a. Null Error
b. ArgumentNullException
c. Compile Time Error
d. Runtime Error
13) Which .NET collection class that allows an element to be accessed using a
unique key?
a. HashTable
b. ArrayList
c. Stack
d. Queue
14) Which FileMode is used to create a new file with the condition that the file with
same name must not exist?
a. FileMode.Create
b. FileMode.OpenOrCreate
c. FileMode.CreateNew
d. FileMode.Truncate
15) How to iterate HashTable object and print Key and Value.
a. KeyValuePair
b. DictionaryEntry
c. Dictionary
d. Object
19) Which is the correct way to declare object to Struct named “Struct1”?
a. Struct1 s=new Struct;
b. Struct1 s=new Struct();
c. Struct1 s;
s=new Struct1;
d. Struct();