Top 50+ Solved C#.NET Programming MCQ Questions Answer
Q. An instance class member is referred by using the format____________.
a. Object name. Class member name.
b. Class name. Class member name.
c. Object name. Class member name or class name. class member name.
d. None of these.
Q. Overloaded constructors will have________.
a. Different names
b. Different parameter lists
c. Different return types
d. none of these.
Q. A static constructor_____________.
a. Is executed when the class is loaded.
b. Can be accessed through an object name.
c. Can be executed any number of times.
d. Can have its own destructor.
Q. A property________________.
a. Should have a get method.
b. Should have a put method.
c. Should have both get and put methods.
d. Should have either a get method or put metho
Q. An indexer________________.
a. Enables us to access a property through index.
b. Can have user-defined name.
c. Is identified by its name.
d. Cannot be overloade
Q. A namespace can contain___________.
a. Classes
b. Namespaces
c. Classes and namespaces
d. None of these.
Q. The alias should have
a. Improve the readability of the code.
b. Avoid name clashes.
c. Saves you typing out very long strings.
d. All the above.
Q. In the case of a component,
a. Reusability is possible.
b. Code will be in IL format.
c. The extension is dll.
d. All the above.
Q. In case of components and namespaces,
a. Several classes may be present in a component.
b. Classes contained in different source files may be part of same namespace.
c. Classes contained in a source file may be from different namespaces.
d. All the above.
Q. In the case of access modifiers___________.
a. Private and protected access modifiers can be specified for a class.
b. Public access modifier can be specified for a class.
c. The scope of the internal access modifier is the namespace.
d. None of these.
Q. An instance of a value type variable is allocated memory on_______.
a. Stack
b. Heap
c. Both a&b
d. None of these
Q. An instance of a reference type variable is allocated memory on_______.
a. Stack
b. Heap
c. Both a&b
d. None of these
Q. ________________ access modifier is applied to a method or a data member, it can beaccessed by all classes in the same namespace and derived class in other namespace.
a. Public
b. Protected
c. Internal
d. Protected internal