Frequently asked dot net Interview Questions

Software Development | Design, Digital, Technology | Oct 29,2021 | By Shashvathi G

Everyone should have a good understanding of the IT industry since it will have a big influence on their future work opportunities. This post will answer most often asked questions. Questions for an online interview.

1.What is the.NET framework, and what does it do?

.NET is a Microsoft platform for developing, hosting, deploying, maintaining, and executing applications. In other words, it takes care of the application's complete development life cycle, making developer lives easier. The.NET framework allows you to create numerous applications in an object-oriented manner. Database-driven client-server programmes, desktop or Windows apps, web applications such as Online banking portals, Online shopping websites, web applications, and web services are examples of these types of applications. The apps are created in.Net utilising languages such as C#, VB.NET, and others. This is one of the most interview questions a candidate might face.

2.What are the various parts of the.NET framework?

The.NET components are listed below: Specification for a Common Language Runtime for Common Language Class Library for the Framework WebForms Forms in Windows Base Classes for the Framework Domain of the Application

3.What exactly is Namespace?

It is a logical collection of classes. System.Web, for example. The UI namespace is a logical collection of UI-related classes that includes features like text boxes, list controls, and so on. The namespace is accessed by utilising keywords.

4.What is code access security (CAS) and how does it work?

Code access security (CAS) is a feature of the.NET framework security architecture that prevents unauthorised access to resources and activities while also limiting code to certain tasks.

5.How do you activate CAS?

Run the following command on the command prompt to enable CAS: caspol -protection on

6.How can you disable CAS?

Run the following command on the command prompt to disable CAS: caspol - security disabled

7.In the.NET Framework, what is the root namespace for basic types?


8.What exactly is CLS?

Common Language Specification (CLS) is an acronym for Common Language Specification. CLS and CTS are supported by the Net language. A subset of the Common Type System is included in the CLS (CTS). CLS specifies how the runtime environment declares, uses, and manages types. The CTS establishes the rules for data kinds. Some CLS regulations are listed below. To create a class, use the new keyword. The array should be based on zero. Object-oriented third-party should be used. If both languages follow the CLS standards, a component of a.NET application built in one language can be utilised in another. CLS-compliant components are those that comply with the CLS standard.

9.What exactly is CTS?

The Common Type System (CTS) is an acronym for Common Type System. The CTS establishes the rules for data kinds. Type safety and cross interoperability are ensured. CTS supports two broad kinds of types, both of which are derived from the System basic type. Object Types of value Types of references CTS is used to specify variables in the managed code of the.NET application. All.NET conforming languages, such as C# and VB.NET, use it as a superset of data types in managed programming.

10.What exactly is CLR?

Common Language Runtime is an acronym for Common Language Runtime. CLR stands for Common Language Runtime, and it is used to run.NET programmes. CLR, which internally converts Microsoft Intermediate Language (MSIL) code into platform-dependent instructions, is the destination for managed code.

11.What is Managed Code, and how does it differ from other types of code?

Assemblies are collections of managed code that is intended to be executed by the CLR. By default, managed code is created by VB.NET and C# compilers. The.NET framework provides Language Interoperability thanks to managed code. A single application can be built using a variety of programming languages. CLR-managed code is code that is handled by the CLR. The.NET framework is required to run the managed code. Garbage collection is used by CLR to manage memory.

12.What is the definition of unmanaged code?

The term "unmanaged code" refers to code that is not managed by the CLR. It is not necessary to use the.NET framework to run unmanaged code; it is self-contained. Unmanaged code has its own runtime environment for execution and compilation.

13.What is the function of a garbage collector?

CLR comes with a garbage collector. This does a cleanup operation on unused managed objects on a regular basis to see if there are any unused or unreferenced objects whose memory may be recovered. The cleaning process is not performed on unmanaged items. This prevents memory leaking and optimises memory management.

14.How do we clean unmanaged code? Garbage collector cleans managed code; how do we clean unmanaged code?

To reclaim memory, the garbage collector executes cleaning operations on managed code. For unmanaged code, we may use destructor / finalise to clear up.

15.What can we do to make the garbage collectors run?

"System.GC.Collect()" can be used to compel the garbage collectors to execute.

16.What is the distinction between the terms "dispose" and "finalise"?

Dispose: The "IDisposable" interface is used by Dispose. To clear up the unmanaged code, the user programme must be called a function. Finalize is a destructor that is invoked internally by the garbage collector to clear up managed programmes. It cannot be called from code.

17.What exactly is an Assembly Loader?

CLR's assembly loader is one of its components. It initially locates and loads the assembly containing the Main() function into memory. It also looks for and loads other FCL classes that are mentioned in the code.

18.What exactly is JIT?

Just-In-Time Compiler (JIT) is an acronym for Just-In-Time Compiler (JIT). The typical JIT compiler is a demand-driven compiler. The JIT compiler examines the MSIL code and generates very efficient machine code when a method is called. Per method, a tiny module is inserted that holds information on whether the method has previously been built. This information is used by the JIT compiler, which compiles just the code that has not yet been translated to native code. As the.NET programmes run, the already-compiled code is reused, the apps grow quicker and faster.

19.What are the various JIT compiler types?

JIT compilers are divided into three categories: It is used in the creation of apps as standard JIT. Pre-JIT: To reduce the expense of JIT compilation at runtime, we may use a special programme called ngen.exe, which compiles IL (Intermediate Language) during the installation and setup process. We can JIT-compile the code once with the ngen tool and cache it on the system to avoid JIT compilation during runtime. Econo JIT is a mobile application development framework.

20.What is an Application Domain, exactly?

On the Windows Operating System, each.NET programme runs in its own worker process. CLR loads managed code in the application context of the process named Application Domain to execute.NET application managed code. What they do is as follows: A single process can execute many application domains. Runtime hosts, who are in charge of bootstrapping the common language runtime before an application is executed, generally generate application domains.

The goal of A2N Academy is to create job-ready individuals with cutting-edge capabilities. Take a look at some of the most popular IT courses they offer. Right now, you may enroll in their dot NET course.

Interested in working with IT companies?

Speak with us today

Do you have career gap?

Are you planning to shift your career?