What are the different types of constructors in c#?

Following are the types of constructors in C#: Default Constructor Parameterized constructor Copy Constructor Static Constructor Private Constructor In C#, there are three types of constructors: Default Constructor: This constructor is provided by the compiler if no constructor is defined explicitly in a class. It initializes the object with default values. For classes, the default … Read more

How do you prevent a class from being inherited?

In C#, we can use the sealed keyword to prevent a class from being inherited. In C# (which is commonly used in .NET development), you can prevent a class from being inherited by using the sealed keyword. When you mark a class as sealed, it means that it cannot be used as a base class … Read more

Explain the different parts of the assembly

Following are the different parts of assembly: Manifest: It has the information about the version of the assembly. Type Metadata: Contains the binary information of the program MSIL: Microsoft Intermediate Language Code Resources: List of related files In a .NET interview, when asked to explain the different parts of an assembly, you would typically cover … Read more

From which base class all web Forms are inherited?

All web forms are inherited from page class. In the context of .NET web forms, all web forms are inherited from the System.Web.UI.Page class. This class serves as the base class for web forms in ASP.NET. When you create a new web form in a .NET application, it implicitly inherits from this class. The System.Web.UI.Page … Read more

What is MSIL?

MSIL is the Microsoft Intermediate Language, it provides instructions for calling methods, storing and initializing values, memory handling, exception handling and so on. All the .NET codes are first compiled to Intermediate Language. MSIL stands for Microsoft Intermediate Language. It’s also known as Intermediate Language (IL) or Common Intermediate Language (CIL). MSIL is a platform-independent, … Read more