Questions & Answers

.NET Framework Questions & Answers

Provides Latest and Useful Interview Q & A on .NET technology

1. What is .NET framework?

.NET is one of the platforms provided by Microsoft, which is used to build a variety of applications using Windows.

2.What are some of the common components of .NET?

3. What does JIT stand for in .NET?

JIT is the abbreviation of Just in Time

4. What is the meaning of MSIL?

MSIL is the abbreviation of Microsoft Intermediate Language.

5. What is CTS?

CTS stands for Common Type System. It is used to manage all the data types in .net framework

6. What is CLS?

Common Language Specification (CLS) is a subset of CTS and defines a set of rules and regulations to be followed by every .NET Framework’s language.

7.What does CLR stand for in .NET?

CLR stands for Common Language Runtime.

8. What is CLR?

It is main component of .NET framework, it is used to provide list of management like:

9. What is an assembly in .NET?

An assembly is a logical unit that contain .DLL or .EXE files.

10. What is the difference between stringbuilder and string in .NET?

stringbuilder is mutable
string is immutable.
stringbuilder support using append.
string Cannot use the append keyword.

11. What is the meaning of state management in .NET?

State management, as the name suggests, is used to constantly monitor and maintain the state of objects in the runtime.

There are two types of state management

12.What are some of the components of an assembly in .NET?

There are four main components of an assembly. They are as follows:

  1. 1.Resource: A collection of related files
  2. 2.MSIL: The Intermediate Language code
  3. 3.Metadata: The binary data of a program
  4. 4.Manifest: A collection of information about the assembly

13. What is the difference between an object and a class in .NET?

object is An instance of a class.
class is The template for creating an object
object A class becomes an object after instantiation.
class The basic scaffolding of an object.
objectUsed to access properties from a class.
classThe description of methods and properties

14. What is the menaing of caching?

Caching is a term used when the data has to be temporarily stored in the memory so that an application can access it quickly rather than looking for it in a hard drive.

There are three types of caching:

15. What is the difference between a function and a stored procedure in .NET?

Function Can only return one value
Stored Procedure Can return any number of values
FunctionThe argument consists of only input parameter
Stored ProcedureBoth input and output parameters are present

16. What are the constructor types present in C# .NET?

There are five main types of constructor classes in C# as listed below:

17. What are some of the advantages of using a session?

There are numerous advantages of making use of a session are as mentioned below:

18. Is it possible to manually set a timeout for a session in .NET?

Yes, it is possible to manually set a session’s out time. It can easily be done by manipulating the web.config file.

19. What is the meaning of boxing and unboxing in .NET?

Boxing is the process that is used when a user wishes to convert a value type into a reference type directly.
Unboxing is the opposite of boxing, where the reference type is converted back into a value type.

20. What is the use of manifest in the .NET framework?

Manifest is mainly used to store the metadata of the assembly. It contains a variety of metadata which is required for many things as given below:

21. What are memory-mapped files used for in .NET?

Memory-mapped files in .NET are used to instantiate the contents of a logical file into the address of the application. This helps a user run processes simultaneously on a single machine and have the data shared between processes.
The MemoryMappedFile.CreateFromFiles() function is used to obtain a memory-mapped file object easily.

22. What is the meaning of CAS in .NET?

CAS stands for Code Access Security. It is vital in the prevention of unauthorized access to programs and resources in the runtime. It can provide limited access to the code to perform only certain operations rather than providing all at a given point in time. CAS forms to be a part of the native .NET security architecture.

23. What is the meaning of garbage collection?

Garbage collection is a process that is used to maintain various aspects of memory to prevent memory leaks during program execution.
If an object is no longer required by the application, the memory is de-allocated and freed up.

24. What is the use of GAC in .NET?

GAC is the abbreviation of Global Assembly Cache. GAC is a part of CLR, which is used to store the assemblies that are shared across all of the applications.

25. What is MVC?

MVC stands for Model-View-Controller. It is an architectural model that is used to build applications in .NET. It serves as the foundation for the creation of applications.

MVC consists of three entities as the name suggests:

26. What are the types of memories supported in the .NET framework?

There are two types of memories present in .NET as listed below:

27.What is the use of delegation in .NET?

A delegate works similar to that of a function pointer of other programming languages. It provides a way to encapsulate the reference of a method in an object.

28. What is managed code?

Managed code is the code which is managed by the CLR(Common Language Runtime) in .NET Framework.

29. What is the meaning of AutoPostBack in .NET?

AutoPostBack is a property in the .NET framework, which provides automatic postback whenever an event starts its execution cycle. To use AutoPostBack, you have to set the property to True.

30. What are the parameters that control connection pooling behaviors in .NET?

There are four main parameters that control connection pooling behaviors in .NET as given below:

31. Differentiate between the user control and the custom control in the .NET framework.

User Control Static Layout
Custom Control Dynamic Layout
user Control No support for the toolbox
Custom Control Supports the usage of the toolbox
User ControlTightly coupled control access
Custom Control Loosely coupled control access

32. What is the meaning of role-based security in .NET?

Role-based security, as the name suggests, is a measure implemented in .NET to provide security access based on the roles assigned to users.

33. What do you mean by cross-page posting?

It means you are posting form data from one page to another page.

34. What is the use of MIME in .NET?

MIME is the short form of Multipurpose Internet Mail Extensions. It is an add-on to the existing email protocols that lets you exchange files over emails easily

35. What are the types of cookies available in ASP.NET?

There are two types of cookies available in ASP.NET as shown below:

•Session cookies: Present on the client machine and valid only for single sessions
•Persistent cookies: Present on the user machine and has a specific period denoting its expiry

36. What is Garbage Collector?

Garbage collection (GC) is a memory recovery feature built into programming languages such as C# and Java.

37. What are the different types of assemblies?

There are two types of assemblies:

38. What is unmanaged code?

Unmanaged code is the code which is directly executed by the operating system.

39. What languages does the .NET Framework support?

.NET Framework supports over 60 programming languages, out of these 11 programming languages are designed and developed by Microsoft.

40. What are the different types of JIT Compilers?

There are 3 types of JIT Compilers:

41. What is business logic?

It is the application processing layer that coordinates between the User Interface Layer and Data Access Layer.

42. What is marshaling in .net?

Marshalling is the process of transforming types when they need to cross between managed and unmanaged code.

43. What is IIS?

Internet Information Server (IIS) is the most popular web server used to host and provide internet-based services to ASP.NET and ASP Web applications.

44. Mention how big is the datatype int in .NET?

Datatype int in .NET is 32 bits.

45. What is PE(Portable Executable) File Format

The Portable Executable (PE) format is a file format for executables, object code, and DLLs, used in 64-bit and 32-bit versions of Windows operating systems.

46. Mention the type of code security available in .NET?

The type of code security available in .NET are

Role based security: This authorizes the user.
Code access security: This protects system resources from unauthorized calls.

47. Mention what is user-defined data type?

A user-defined data type is a named data type created by the user.

48. what is event bubbling in .NET?

The event bubbling in .NET is defined as the passing of the control from child to the parent is called as bubbling. Controls like datalist, datagrid, repeater, etc. can have child controls like listbox, etc.

49. What are the debugging windows available?

50. What is the purpose of the System.Diagnostics namespace in .NET?

The System.Diagnostics namespace provides classes for interacting with system processes, events, performance counters, and debugging functionality in .NET.

51. What are extension methods in C# and how are they used?

Extension methods in C# allow developers to add new methods to existing types without modifying their source code

52. Why should i learn .NET?

Learning .NET will help you become familiar with the latest developments within the .NET Framework. The knowledge gained through learning .NET can be applied in different fields such as software development, database management, networking, graphics, multimedia, etc.