Dot Net Framework Interview Questions & Answers

4 avg. rating (80% score) - 1 votes

Dot Net Framework Interview Questions & Answers

Are you looking to begin a career in Dot Net Framework? Or want to switch to another organization as a Dot Net Framework developer? Wisdomjobs cover some of the commonly-asked Dot Net Framework interview questions for the position of a Dot Net Framework developer. Programmers generate software by integrating their source code with .NET Framework and other libraries. The framework is proposed to be used by most of the new applications build for the Windows platform. Many Dot Net Framework jobs are published by top companies for top positions like Dot Net Developer, Team Leader, Software Engineer, Dot Net Programmer, .Net Software Developer, System Engineer, .Net Architect, Technical Lead etc. Go through our Dot Net Framework job interview questions and answers page designed by professionals that can help you to get ready to answer job-related interview questions.

Dot Net Framework Interview Questions

Dot Net Framework Interview Questions
    1. Question 1. What Are The Advantages Of .net?

      Answer :

      • Good Design
      • Object-Oriented Programming – Using C# and .NET which are based on object-oriented Concepts.
      • Language Independence – All the languages which are supported by .Net (VB.NET, C#, J#, and managed C++) are compiled into common Intermediate Language (IL). So IL makes sure that languages are interoperable.
      • Efficient Data Access – ADO.NET provides fast and efficient way to access RDBMS, file system etc.
      • Code Sharing – To share code between applications, a new concept called assembly is introduced. Assemblies supports versioning.
      • Improved Security
      • Support Dynamic Web Pages – Using ASP.NET
      • Support for Web Services

       

    2. Question 2. What Is .net Framework ?

      Answer :

      The .NET framework is a programming framework from Microsoft. Developers can use .Net Framework to develop applications, install and run the application on Windows operating systems.

    3. Question 3. What Is Ms-il (microsoft Intermediate Language) ?

      Answer :

      When a program is complied in .Net, the source code will be converted into an intermediate language called Microsoft Intermediate Language (MS-IL). This is done by Just-In time Compiler (JIT). The dot net framework is built in such a way that the code is Just-In time complied, which means that it get complied when it is called rather than compiling entire code at the start up. A portion of the code will get complied only once and it will exist till the application exit. This will have a significant improvement in performance since the entire section of the code won't get executed in most cases.

    4. Question 4. What Is Common Language Runtime (clr) ?

      Answer :

      Common Language Runtime or CLR is the run-time execution environment of .Net Framework. Converting MS-IL into platform or OS specific code is done by the CLR. Currently, .Net programs will run only on windows.

    5. Question 5. What Is Common Type System (cts) ?

      Answer :

      .Net uses Common Type System (CTS) for Language Interoperability. CTS defines the predefined data types that are available in IL, so that all languages that target the .NET framework will produce the compiled code that is ultimately based on these types. CTS ensures that a data type defined in a VB.net will be understood by C#. For example, VB.Net uses “Integer” to define the data type Integer. C# uses  “int” to define the data type Integer. When VB.Net code is compiled, it will convert the Integer to Int32. Since C# refers Int to Int32, VB.Net code will be understood by C#.

    6. Question 6. What Is Common Language Specification (cls) ?

      Answer :

      Common Language Specification (CLS) is used for Language Interoperability in tandem with CTS to ensure the interoperability of the languages. CLS defines a set of minimum standards that all compilers targeting dot net must support. For example, VB.Net is not case sensitive. So attribute “EmployeeName” and “employeename” is considered same. But C# is case sensitive. So for language interoperability, C# doesn't allow two variables which differ only in case.

    7. Question 7. What Is Garbage Collector ?

      Answer :

      Garbage Collector is used in dot net Framework for memory management. While running an application, applications make a request for memory for its internal use. Framework allocates memory from the heap. Once the process is completed, allocated memory needs to be reclaimed for future use. The process of reclaiming unused memory is taken care by the Garbage Collector.

    8. Question 8. How To Invoke Garbage Collector Programmatically ?

      Answer :

      To call garbage collector from a program, use code “ GC.Collect(); “

    9. Question 9. What Is A Managed Code ?

      Answer :

      Managed code is code that can be executed and managed by .NET Framework Common Language Runtime. All codes based on the intermediate language(EL) executes as managed code.

    10. Question 10. What Is An Assembly ?

      Answer :

      Assemblies are self-describing logical unit which consists of one or more files targeted at dot net. An assembly can be stored across single file such as a single DLL or EXE that includes metadata, or it canbe stored in multiple files.

      For example, resource files like meta data, DLL's, and an EXE. Assemblies support versioning.

    11. Question 11. What Is Assembly Manifest ?

      Answer :

      Part of the assembly which contains assembly meta data that describes the assembly itself is known as manifest. Assembly manifest contains Assembly Name, Version Number, Culture, Strong name, List of files inside the assembly and Reference information.

    12. Question 12. What Are The Different Types Of Assembly ?

      Answer :

      The two types of Assemblies are Shared and Private.

    13. Question 13. What Is A Private Assembly ?

      Answer :

      Private Assemblies are intended to be used by the program for which it is made for. Reason behind this is that, the application will only load private assemblies that are located in the same folder or in the sub folder of the main executable.

    14. Question 14. What Is Shared Assembly ?

      Answer :

      Shared Assemblies contain Common Libraries which are intended to be used by multiple applications. While making shared assemblies, name collisions and overwriting existing assemblies need to be taken care. Name Collisions can be taken care by strong name. Global assembly cache can be used to avoid assembly overwriting.

    15. Question 15. How To View Assembly Information ?

      Answer :

      By using Ildasm.exe, which is an MSIL Disassembler one can view attributes, references to other modules and assemblies.

    16. Question 16. Where Is The Assembly Version Information Stored ?

      Answer :

      In the Manifest.

    17. Question 17. What Is Namespace ?

      Answer :

      A namespace is a logical grouping of related classes and types. Every class should have a NameSpace.

    18. Question 18. What Is The Difference Between Namespace And Assembly ?

      Answer :

      • Namespace:
      • Forms the logical boundary for a Group of classes.
      • It is a Collection of names where each name is Unique.
      • The namespace must be specified in Project Properties.
      • Assembly:
      • Assemblies are Self-Describing
      • It is an Output Unit. It is a unit of deployment and is used for versioning. Assemblies contain MSIL code.

       

    19. Question 19. What Is Global Assembly Cache (gac) ?

      Answer :

      While using shared assemblies, to avoid Assembly being overwritten by a different version of the same assembly, shared assemblies are placed in a special directory subtree of the file system known as the global assembly cache (GAC). Placing shared assemblies can only be done by a special .Net Utilities.

    20. Question 20. Explain The Concept Of Strong Names ?

      Answer :

      While using shared assemblies, in order to avoid name collisions strong names are used. Strong Names are based on private key cryptography, ie. private assemblies are simply given the same name as their main file name.

    21. Question 21. How To Add And Remove A Assembly From Gac?

      Answer :

      To install assembly in Cache, use  Gacutil. To run Gacutil, goto "Visual Studio Command Prompt" and type "gacutil -i <assembly_name>", where (assembly_name) is the DLL name of the project. To uninstall assembly, type gacutil –u <assembly name> in  Visual Studio Command Prompt.

    22. Question 22. What Is Reflection?

      Answer :

      Reflection is used to dynamically load a class, create object and invoke methods at runtime. It can also be used to read its own meta data to find assemblies, modules and type information at runtime.

    23. Question 23. What Is Delay Signing ?

      Answer :

      To create a strong named assembly and to make sure that this assembly can used by someone else, we partially build this assembly by providing a Public Key. We write this Public Key in the AssemblyInfo.vb OR .cs file. We also add an attribute by the name <Assembly:AssemblyDelaySignAttribute(true)> to the assembly info file. This makes it sure that when we build the assembly, it would be containing the information only about the public key before we deliver it to our clients. This is a partial strong named assembly that we have created, and hence it is called Delayed Assembly.

    24. Question 24. What Are The Different Type Of Jit's ?

      Answer :

      Different Types of JIT are:

      1. Pre-JIT -  Complies complete source code into native code at the time of deployment.
      2. Econo-JIT  - Complies methods that are called at runtime. 
      3. Normal-JIT - Complies methods that are called at runtime and get stored in cache. Next time when the same method is called, it will be taken from cache.

    25. Question 25. What Are Value Types And Reference Types ?

      Answer :

      There are two types of data types in .Net, Value types and Reference types. Value types are stored in stack part of the memory. Reference type are stored in managed heap. Let have a look at the example for better understanding.

      Int iCount = 0; Value Type 

      int NewiCount =  iCount;   Reference Type

    26. Question 26. Explain The Concept Of Boxing And Unboxing ?

      Answer :

      Converting a value type to reference type is called Boxing. Converting a reference type to value type is called Unboxing.

    27. Question 27. What’s The Difference Between System Exceptions And Application Exceptions?

      Answer :

      System exceptions are common exceptions thrown by the CLR of .Net Framework. Application exceptions can be user defined exceptions thrown by the application.

    28. Question 28. What Is Code Access Security?

      Answer :

      CODE Access security is a security model that let us grant or deny execution permissions to an assembly according to its "properties," called evidence, such as its strong name or publisher.

    29. Question 29. What Is A Satellite Assembly?

      Answer :

      A satellite assembly are used when multilingual (UI) application are created. Satellite assembly is a compiled library that contains localized resources  which provides us with the capability of designing and deploying solutions to multiple cultures, rather than hard coding texts, bitmaps etc

    30. Question 30. How To Prevent My .net Dll To Be Decompiled ?

      Answer :

      We can prevent .NET DLL to be decompiled upto an extent by Obfuscate Source code, asymmetric encryption and encrypted w32 wrapper application.

    31. Question 31. What Is Native Image Generator (ngen.exe) ?

      Answer :

      Ngen.exe creates compiled processor-specific machine code called native images which are files and installs them into the native image cache on the local computer. The runtime will use native images from the cache rather than using the JIT compiler to compile the original assembly.

    32. Question 32. What Is Code Document Object Model (codedom) ?

      Answer :

      Code Document Object Model are code generators which are used  to minimize repetitive coding tasks, and to minimize the number of human-generated source code lines.

Asp.net Tutorial

Dot Net Framework Practice Tests

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

ASP.NET Tutorial