Posts .NET Interview questions
Post
Cancel

.NET Interview questions

Q-1: What is the .NET framework?

  • The .NET framework supports an object-oriented approach that is used for building applications on windows.
  • It supports various languages like C#, VB, Cobol, Perl, .NET, etc.
  • It has a wide variety of tools and functionalities like class, library and APIs that are used to build, deploy and run web services and different applications.

Q-2: What are the different components of .NET?

  • Common Language run-time (CLR)
  • Application Domain
  • Common Type System (CTS)
  • .NET Class Library
  • .NET Framework
  • Profiling

Q-3: What do you know about CTS?

  • CTS stands for Common Type System.
  • It follows certain rules according to which a data type should be declared and used in the program code.
  • CTS also describes the data types that are going to be used in the application.

Q-4: What is CLR?

  • CLR stands for common language run-time, it is an important component of the .NET framework.
  • Whenever an application written in C# is compiled, the code is converted into an intermediate language.
  • After this, the code is targeted to CLR which then performs several operations like memory management, security checks, loading assemblies, and thread management.

Q-5: Explain CLS.

Data type of a variable declared using var will be assigned at

  • Compile time

Return type of Predicate () is always a

  • Boolean

Func and Action are the types of

  • Delegate

What is indexer?

  • It allows an instance of a class to be indexed like an array

The model is a

  • Shape of data

HtmlHelper class

  • Generates html elements

Which of the following view contains common parts of UI?

  • Layout view

What is action filters?

  • Action filter executes before and after action method executes.

Which of the following default class is used to configure all the routes in MVC?

  • RouteConfig

What is the difference between constants and read-only?

Constant variables are declared and initialized at compile time. The value can’t be changed afterward. Read-only is used only when we want to assign the value at run time.

What is an interface class? Give one example of it

An Interface is an abstract class which has only public abstract methods, and the methods only have the declaration and not the definition. These abstract methods must be implemented in the inherited classes.

This post is licensed under CC BY 4.0 by the author.