.NET Programming MCQs with answers Page - 37

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 .NET version introduced a unified platform for all app types?

  • (A) .NET Core 3.1
  • (B) .NET 5
  • (C) .NET Framework 4.8
  • (D) .NET Standard 2.1

R

Ram Sharma • 3.40K Points
Extraordinary

Q. Which directory does `dotnet publish` output files to by default?

  • (A) bin\Debug
  • (B) obj\Release
  • (C) bin\Release\netX\publish
  • (D) dist\

R

Ram Sharma • 3.40K Points
Extraordinary

Q. What does `System.GC.GetTotalMemory()` return?

  • (A) Heap size
  • (B) Memory used by unmanaged resources
  • (C) Approximate memory allocated by managed objects
  • (D) Total available RAM

R

Ram Sharma • 3.40K Points
Extraordinary

Q. What is the `.deps.json` file used for in .NET Core?

  • (A) To store deployment instructions
  • (B) To track project build dependencies
  • (C) To manage NuGet settings
  • (D) To hold output logs

R

Ram Sharma • 3.40K Points
Extraordinary

Q. What does the `RuntimeInformation` class provide?

  • (A) App execution logs
  • (B) Runtime OS and architecture info
  • (C) Thread pool diagnostics
  • (D) Stack trace debugging

R

Ram Sharma • 3.40K Points
Extraordinary

Q. Which NuGet package is required for JSON serialization in .NET Core?

  • (A) System.Xml
  • (B) Microsoft.NetCore.Json
  • (C) System.Text.Json
  • (D) Newtonsoft.Core

R

Ram Sharma • 3.40K Points
Extraordinary

Q. Which runtime optimization avoids JIT compilation?

  • (A) RyuJIT
  • (B) Tiered Compilation
  • (C) AOT (Ahead-of-Time) Compilation
  • (D) IL Optimization

R

Ram Sharma • 3.40K Points
Extraordinary

Q. What is the role of `dotnet runtime`?

  • (A) Build applications
  • (B) Generate documentation
  • (C) Execute compiled .NET applications
  • (D) Install SDK tools

R

Ram Sharma • 3.40K Points
Extraordinary

Q. Which class in .NET provides information about the current process?

  • (A) System.Threading.Thread
  • (B) System.AppContext
  • (C) System.Diagnostics.Process
  • (D) System.Environment

R

Ram Sharma • 3.40K Points
Extraordinary

Q. What does the 'dotnet build' command do?

  • (A) Runs the application
  • (B) Cleans the output directory
  • (C) Compiles the source code
  • (D) Publishes files for deployment

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