Top 80+ Solved DotNet Technology MCQ Questions Answer
Q. Which of the following statements is correct about properties used in C#.NET?
a. Every property must have a set accessor and a get accessor.
b. Properties cannot be overloaded.
c. Properties of a class are actually methods that work like data members.
d. A property has to be either read only or a write only.
Q. Which of the following is NOT a .NET Exception class?
a. Exception
b. StatckMemoryException
c. DivideByZeroException
d. OutofMemoryException
Q. Which of the following statements is correct about an Exception?
a. It occurs during compilation.
b. It occurs during linking.
c. It occurs at run-time.
d. It occurs during loading of the program.
Q. In C#.NET if we do not catch the exception thrown at runtime then which of thefollowing will catch it?
a. Compiler
b. CLR
c. Linker
d. Loader
Q. Which of the following is the Object Oriented way of handling run-time errors?
a. OnError
b. HERESULT
c. Exceptions
d. Error Codes
Q. Exceptions can be thrown even from a constructor, whereas error codes cannot bereturned from a constructor.
a. True
b. False
c. none
d. all
Q. It is compulsory for all classes whose objects can be thrown with throw statement to bederived from System.Exception class.
a. True
b. False
c. none
d. all
Q. Which of the following is NOT an Exception?
a. Stack Overflow
b. Division By Zero
c. Insufficient Memory
d. Incorrect Arithmetic Expression
Q. Which of the following is NOT a namespace in the .NET Framework Class Library?
a. System.Process
b. System.Security
c. System.Threading
d. System.Drawing
Q. Which of the following statements is correct about a namespace in C#.NET?
a. Namespaces help us to control the visibility of the elements present in it.
b. A namespace can contain a class but not another namespace.
c. If not mentioned, then the name 'root' gets assigned to the namespace.
d. It is necessary to use the using statement to be able to use an element of a namespace.
Q. Which of the following statements is correct about a namespace used in C#.NET?
a. Nested namespaces are not allowed.
b. Importing outer namespace imports inner namespace.
c. Nested namespaces are allowed.
d. If nested, the namespaces cannot be split across files.
Q. Which of the following denote the web control associated with Table control functionof ASP.NET?
a. DataList
b. ListBox
c. TableRow
d. All the above
Q. ASP.NET separates the HTML output from program logic using a feature named as
a. Exception
b. Code-behind
c. Code-front
d. None of the above