.NET Programming MCQs with answers Page - 25

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. Which access modifier allows access only within the same class?

  • (A) public
  • (B) internal
  • (C) private
  • (D) protected

R

Ram Sharma • 3.40K Points
Extraordinary

Q. What does `await` do in an async method?

  • (A) Blocks execution
  • (B) Waits without blocking
  • (C) Terminates task
  • (D) Skips method body

R

Ram Sharma • 3.40K Points
Extraordinary

Q. What is the purpose of `HttpClient` in .NET?

  • (A) Host web server
  • (B) Make HTTP requests
  • (C) Configure IIS
  • (D) Create MVC routes

R

Ram Sharma • 3.40K Points
Extraordinary

Q. What type is `List<int>` in .NET?

  • (A) Non-generic collection
  • (B) Generic collection
  • (C) Tuple
  • (D) Key-value pair

R

Ram Sharma • 3.40K Points
Extraordinary

Q. Which attribute marks a class as a controller in ASP.NET Core?

  • (A) [Route]
  • (B) [ApiController]
  • (C) [HttpPost]
  • (D) [Controller]

R

Ram Sharma • 3.40K Points
Extraordinary

Q. Which C# keyword is used to define an interface?

  • (A) interface
  • (B) implements
  • (C) class
  • (D) struct

R

Ram Sharma • 3.40K Points
Extraordinary

Q. Which property is used to get query string in ASP.NET Core?

  • (A) Request.Form
  • (B) Request.Headers
  • (C) Request.Query
  • (D) Request.Body

R

Ram Sharma • 3.40K Points
Extraordinary

Q. Which of these types is immutable in .NET?

  • (A) StringBuilder
  • (B) List
  • (C) String
  • (D) Array

R

Ram Sharma • 3.40K Points
Extraordinary

Q. Which .NET keyword is used to handle final cleanup before garbage collection?

  • (A) release
  • (B) dispose
  • (C) finalize
  • (D) destruct

R

Ram Sharma • 3.40K Points
Extraordinary

Q. What is the purpose of `IDisposable` interface in .NET?

  • (A) To manage memory allocation
  • (B) To close network connections
  • (C) To release unmanaged resources
  • (D) To finalize objects

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