NEW
Font size
WorksheetsDot Net Programming
Total questions: 15
Worksheet time: 8mins
What is the primary programming language used in .NET development?
Python
C#
JavaScript
Java
What is the purpose of the Common Language Runtime (CLR) in .NET?
To brew coffee
To play music
To bake cookies
To provide a runtime environment for managing code execution and system services in .NET applications.
Explain the difference between value types and reference types in .NET.
Value types store data indirectly, while reference types store data directly.
Value types and reference types are interchangeable in .NET.
Value types are mutable, while reference types are immutable.
Value types store data directly, while reference types store a reference to the data.
What is the role of the Global Assembly Cache (GAC) in .NET?
It is used to store user-specific configuration settings.
It stores shared assemblies for use by multiple applications in a versioned and side-by-side manner.
It acts as a cache for storing temporary data during runtime.
It provides a backup for system files in case of corruption.
What are the advantages of using ASP.NET for web development?
ASP.NET offers a robust framework, seamless integration with Microsoft technologies, multi-language support, built-in security features, and easy deployment and maintenance.
ASP.NET is not user-friendly for beginners
ASP.NET has limited functionality compared to other frameworks
ASP.NET does not support cross-platform development
What is the significance of the .NET Framework Class Library (FCL)?
Developers cannot customize or extend the FCL functionalities
The FCL is only useful for basic applications
The FCL is only compatible with specific programming languages
The .NET Framework Class Library (FCL) is significant as it offers a wide range of pre-built functionalities that developers can leverage to streamline application development.
How does garbage collection work in .NET?
Garbage collection in .NET is a process where the runtime environment automatically manages memory by identifying and freeing up objects that are no longer in use. It works by periodically scanning the managed heap to find objects that are no longer reachable or referenced by the application.
Garbage collection in .NET prioritizes memory allocation over deallocation
Garbage collection in .NET involves manual memory management by the developer
Garbage collection in .NET only frees up memory when the application is closed
What is the purpose of the using statement in C#?
To automatically generate unit tests
To ensure proper disposal of resources
To enhance runtime performance
To improve code readability
Explain the concept of inheritance in object-oriented programming with respect to .NET.
Inheritance in .NET is achieved by copying and pasting code from one class to another
Inheritance allows a class to inherit only attributes but not methods from another class in .NET
Inheritance in object-oriented programming allows a new class to be created based on an existing class, inheriting attributes and methods. In .NET, inheritance is implemented using the 'class' keyword followed by the base class name after a colon.
Inheritance in object-oriented programming is not supported in .NET
What are the different types of authentication supported by ASP.NET?
Forms authentication, Windows authentication, Passport authentication, None authentication
Token authentication
Basic authentication
Digest authentication
What is the role of the web.config file in ASP.NET applications?
It stores user authentication information
It determines the color scheme of the application
It stores settings that determine how the ASP.NET application behaves.
It is used to define the layout of the website
How can you implement error handling in .NET applications?
Manually handle errors without try-catch blocks
Ignore all errors and hope for the best
Use Python instead of .NET
Use try-catch blocks for handling exceptions, along with features like finally block and throw statement for custom exceptions.
What is the difference between WCF and Web API in .NET?
WCF is suitable for mobile applications, while Web API is not
WCF uses JSON exclusively, while Web API supports XML and JSON
WCF is more suitable for complex enterprise applications using SOAP, while Web API is more lightweight and suitable for simple RESTful services using HTTP.
WCF is a standalone framework, while Web API is a part of ASP.NET
Explain the concept of LINQ (Language Integrated Query) in .NET.
LINQ is a database management system in .NET.
LINQ in .NET is a feature that enables querying data from various sources using a consistent query syntax.
LINQ is a programming language used for developing mobile applications in .NET.
LINQ is a feature for creating graphical user interfaces in .NET.
What are the key features of the Entity Framework in .NET?
NoSQL support, automatic schema generation, integration with Java
Manual query writing, limited database compatibility, lack of LINQ support
Object-relational mapping, LINQ support, automatic change tracking, code-first and database-first approaches, integration with ASP.NET
