wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Dot Net Programming

Total questions: 15

Worksheet time: 8mins

Name
Class
Date
1.

What is the primary programming language used in .NET development?

a)

Python

b)

C#

c)

JavaScript

d)

Java

2.

What is the purpose of the Common Language Runtime (CLR) in .NET?

a)

To brew coffee

b)

To play music

c)

To bake cookies

d)

To provide a runtime environment for managing code execution and system services in .NET applications.

3.

Explain the difference between value types and reference types in .NET.

a)

Value types store data indirectly, while reference types store data directly.

b)

Value types and reference types are interchangeable in .NET.

c)

Value types are mutable, while reference types are immutable.

d)

Value types store data directly, while reference types store a reference to the data.

4.

What is the role of the Global Assembly Cache (GAC) in .NET?

a)

It is used to store user-specific configuration settings.

b)

It stores shared assemblies for use by multiple applications in a versioned and side-by-side manner.

c)

It acts as a cache for storing temporary data during runtime.

d)

It provides a backup for system files in case of corruption.

5.

What are the advantages of using ASP.NET for web development?

a)

ASP.NET offers a robust framework, seamless integration with Microsoft technologies, multi-language support, built-in security features, and easy deployment and maintenance.

b)

ASP.NET is not user-friendly for beginners

c)

ASP.NET has limited functionality compared to other frameworks

d)

ASP.NET does not support cross-platform development

6.

What is the significance of the .NET Framework Class Library (FCL)?

a)

Developers cannot customize or extend the FCL functionalities

b)

The FCL is only useful for basic applications

c)

The FCL is only compatible with specific programming languages

d)

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.

7.

How does garbage collection work in .NET?

a)

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.

b)

Garbage collection in .NET prioritizes memory allocation over deallocation

c)

Garbage collection in .NET involves manual memory management by the developer

d)

Garbage collection in .NET only frees up memory when the application is closed

8.

What is the purpose of the using statement in C#?

a)

To automatically generate unit tests

b)

To ensure proper disposal of resources

c)

To enhance runtime performance

d)

To improve code readability

9.

Explain the concept of inheritance in object-oriented programming with respect to .NET.

a)

Inheritance in .NET is achieved by copying and pasting code from one class to another

b)

Inheritance allows a class to inherit only attributes but not methods from another class in .NET

c)

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.

d)

Inheritance in object-oriented programming is not supported in .NET

10.

What are the different types of authentication supported by ASP.NET?

a)

Forms authentication, Windows authentication, Passport authentication, None authentication

b)

Token authentication

c)

Basic authentication

d)

Digest authentication

11.

What is the role of the web.config file in ASP.NET applications?

a)

It stores user authentication information

b)

It determines the color scheme of the application

c)

It stores settings that determine how the ASP.NET application behaves.

d)

It is used to define the layout of the website

12.

How can you implement error handling in .NET applications?

a)

Manually handle errors without try-catch blocks

b)

Ignore all errors and hope for the best

c)

Use Python instead of .NET

d)

Use try-catch blocks for handling exceptions, along with features like finally block and throw statement for custom exceptions.

13.

What is the difference between WCF and Web API in .NET?

a)

WCF is suitable for mobile applications, while Web API is not

b)

WCF uses JSON exclusively, while Web API supports XML and JSON

c)

WCF is more suitable for complex enterprise applications using SOAP, while Web API is more lightweight and suitable for simple RESTful services using HTTP.

d)

WCF is a standalone framework, while Web API is a part of ASP.NET

14.

Explain the concept of LINQ (Language Integrated Query) in .NET.

a)

LINQ is a database management system in .NET.

b)

LINQ in .NET is a feature that enables querying data from various sources using a consistent query syntax.

c)

LINQ is a programming language used for developing mobile applications in .NET.

d)

LINQ is a feature for creating graphical user interfaces in .NET.

15.

What are the key features of the Entity Framework in .NET?

a)

NoSQL support, automatic schema generation, integration with Java

b)

Manual query writing, limited database compatibility, lack of LINQ support

c)

Object-relational mapping, LINQ support, automatic change tracking, code-first and database-first approaches, integration with ASP.NET