C#- .NET Framework Question and Answer
C#- .NET Framework Question and Answer
1. Which of the following statements are TRUE about the .NET CLR?
It provides a language-neutral development & execution environment.
It ensures that an application would not be able to access memory that it is not authorized to access.
It provides services to run "managed" applications.
The resources are garbage collected.
It provides services to run "unmanaged" applications.
It provides a language-neutral development & execution environment.
It ensures that an application would not be able to access memory that it is not authorized to access.
It provides services to run "managed" applications.
The resources are garbage collected.
It provides services to run "unmanaged" applications.
- Only 1 and 2
- Only 1, 2 and 4
- 1, 2, 3, 4
- Only 4 and 5
2. Which of the following are valid .NET CLR JIT performance counters?
Total memory used for JIT compilation
Average memory used for JIT compilation
Number of methods that failed to compile with the standard JIT
Percentage of processor time spent performing JIT compilation
Percentage of memory currently dedicated for JIT compilation
Total memory used for JIT compilation
Average memory used for JIT compilation
Number of methods that failed to compile with the standard JIT
Percentage of processor time spent performing JIT compilation
Percentage of memory currently dedicated for JIT compilation
- 1, 5
- 3, 4
- 1, 2
- 4, 5
3. Which of the following statements is correct about Managed Code?
- Managed code is the code that is compiled by the JIT compilers.
- Managed code is the code where resources are Garbage Collected.
- Managed code is the code that runs on top of Windows.
- Managed code is the code that is written to target the services of the CLR.
4. Which of the following utilities can be used to compile managed assemblies into processor-specific native code?
- gacutil
- ngen
- sn
- dumpbin
5. Which of the following are NOT true about .NET Framework?
It provides a consistent object-oriented programming environment whether object code is stored and executed locally, executed locally but Internet-distributed, or executed remotely.
It provides a code-execution environment that minimizes software deployment and versioning conflicts.
It provides a code-execution environment that promotes safe execution of code, including code created by an unknown or semi-trusted third party.
It provides different programming models for Windows-based applications and Web-based applications.
It provides an event driven programming model for building Windows Device Drivers.
It provides a consistent object-oriented programming environment whether object code is stored and executed locally, executed locally but Internet-distributed, or executed remotely.
It provides a code-execution environment that minimizes software deployment and versioning conflicts.
It provides a code-execution environment that promotes safe execution of code, including code created by an unknown or semi-trusted third party.
It provides different programming models for Windows-based applications and Web-based applications.
It provides an event driven programming model for building Windows Device Drivers.
- 1, 2
- 2, 4
- 4, 5
- 1, 2, 4
6. Which of the following components of the .NET framework provide an extensible set of classes that can be used by any .NET compliant programming language?
- .NET class libraries
- Common Language Runtime
- Common Language Infrastructure
- Component Object Model
7. Which of the following jobs are NOT performed by Garbage Collector?
Freeing memory on the stack.
Avoiding memory leaks.
Freeing memory occupied by unreferenced objects.
Closing unclosed database collections.
Closing unclosed files.
Freeing memory on the stack.
Avoiding memory leaks.
Freeing memory occupied by unreferenced objects.
Closing unclosed database collections.
Closing unclosed files.
- 1, 2, 3
- 3, 5
- 1, 4, 5
- 3, 4
8. Which of the following .NET components can be used to remove unused references from the managed heap?
- Common Language Infrastructure
- CLR
- Garbage Collector
- Class Loader
9. Which of the following statements correctly define .NET Framework?
- It is an environment for developing, building, deploying and executing Desktop Applications, Web Applications and Web Services.
- It is an environment for developing, building, deploying and executing only Web Applications.
- It is an environment for developing, building, deploying and executing Distributed Applications.
- It is an environment for developing, building, deploying and executing Web Services.
10. Which of the following constitutes the .NET Framework?
ASP.NET Applications
CLR
Framework Class Library
WinForm Applications
Windows Services
ASP.NET Applications
CLR
Framework Class Library
WinForm Applications
Windows Services
- 1, 2
- 2, 3
- 3, 4
- 2, 5