.NET Programming MCQs with answers Page - 29

Here, you will find a collection of MCQ questions on .NET Programming. Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

R

Ram Sharma • 3.40K Points
Extraordinary

Q. What does `try-catch-finally` handle in C#?

  • (A) File I/O
  • (B) Thread management
  • (C) Exception handling
  • (D) String conversion

R

Ram Sharma • 3.40K Points
Extraordinary

Q. Which method writes output to the console in C#?

  • (A) Write()
  • (B) Output()
  • (C) Print()
  • (D) Console()

R

Ram Sharma • 3.40K Points
Extraordinary

Q. Which feature in C# allows defining a method with the same name but different parameters?

  • (A) Overriding
  • (B) Overloading
  • (C) Polymorphism
  • (D) Extension

R

Ram Sharma • 3.40K Points
Extraordinary

Q. What does `is` keyword do in C#?

  • (A) Casts object to type
  • (B) Checks object type
  • (C) Creates instance
  • (D) Declares inheritance

R

Ram Sharma • 3.40K Points
Extraordinary

Q. Which method in `List<T>` removes all elements?

  • (A) DeleteAll()
  • (B) Remove()
  • (C) Clear()
  • (D) Reset()

R

Ram Sharma • 3.40K Points
Extraordinary

Q. Which LINQ method returns the first element matching a condition?

  • (A) First()
  • (B) Find()
  • (C) FirstOrDefault()
  • (D) Take()

R

Ram Sharma • 3.40K Points
Extraordinary

Q. Which directive includes a namespace in C#?

  • (A) using
  • (B) include
  • (C) import
  • (D) namespace

R

Ram Sharma • 3.40K Points
Extraordinary

Q. Which of the following represents a value type in .NET?

  • (A) string
  • (B) object
  • (C) int
  • (D) Array

R

Ram Sharma • 3.40K Points
Extraordinary

Q. What is the role of the CLR in .NET?

  • (A) Compiles source code to machine code
  • (B) Manages memory, security, and execution of .NET programs
  • (C) Handles front-end rendering
  • (D) Provides networking capabilities

R

Ram Sharma • 3.40K Points
Extraordinary

Q. Which of the following is a portable, intermediate representation of .NET code?

  • (A) CLR
  • (B) MSIL
  • (C) CIL
  • (D) JIT

Add MCQ in this Category

If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.

Share Your MCQ