.NET Programming MCQs with answers Page - 40

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 is the primary purpose of the IL (Intermediate Language)?

  • (A) Enable platform-specific execution
  • (B) Provide a common format for source code
  • (C) Provide a CPU-agnostic format compiled by the CLR
  • (D) Store project dependencies

R

Ram Sharma • 3.40K Points
Extraordinary

Q. Which runtime component verifies code safety and type correctness?

  • (A) JIT Compiler
  • (B) Metadata Reader
  • (C) Verification Engine
  • (D) CLR Loader

R

Ram Sharma • 3.40K Points
Extraordinary

Q. What is the function of 'dotnet store' command?

  • (A) Creates NuGet packages
  • (B) Publishes app for deployment
  • (C) Caches runtime packages in a local store
  • (D) Stores logs in diagnostics

R

Ram Sharma • 3.40K Points
Extraordinary

Q. Which file holds settings used during application startup?

  • (A) startup.config
  • (B) appsettings.json
  • (C) runtimeconfig.json
  • (D) project.assets.json

R

Ram Sharma • 3.40K Points
Extraordinary

Q. Which attribute marks an assembly as CLS-compliant?

  • (A) [Assembly: CLSCompliant(true)]
  • (B) [Assembly: ComVisible(false)]
  • (C) [CLSCompatible]
  • (D) [CLRCompliant]

R

Ram Sharma • 3.40K Points
Extraordinary

Q. What is a 'RID' in .NET used for?

  • (A) Runtime ID for logs
  • (B) Resource Integration Descriptor
  • (C) Runtime Identifier to define platform-specific packages
  • (D) Razor Integration Device

R

Ram Sharma • 3.40K Points
Extraordinary

Q. Which tool is used to inspect GC behavior and memory usage?

  • (A) dotnet trace
  • (B) dotnet gc
  • (C) dotnet monitor
  • (D) dotnet counters

R

Ram Sharma • 3.40K Points
Extraordinary

Q. What does 'Tiered Compilation' improve in .NET runtime?

  • (A) UI rendering
  • (B) JIT throughput and performance
  • (C) Thread affinity
  • (D) Stack size

R

Ram Sharma • 3.40K Points
Extraordinary

Q. What is an 'AppContext switch' used for in .NET?

  • (A) Enable multiple main methods
  • (B) Control CLR-level feature behaviors
  • (C) Switch framework versions
  • (D) Launch debugger

R

Ram Sharma • 3.40K Points
Extraordinary

Q. What does the GC 'compact large object heap' option do?

  • (A) Shrinks all objects
  • (B) Enables defragmentation of the large object heap
  • (C) Removes unused threads
  • (D) Compresses assemblies

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