1031

What is static class?

Static Class: A static class is a collection of unrelated methods like utility/helper classes. Hence, it is not related to the real-world object. you can not create an object of it. If the “Static” modifier is used to define a static class along with class name which makes class non-instantiable. If the static modifier is used […]

Read More
1025

What is partial classes and methods?

Partial classes: This feature enables you to split the definition of a class over multiple physical source files with a .cs extension. Each source file contains a section of the type or method definition, and all source files are combined as a single file when the application is compiled. The partial modifier can be applied to a […]

Read More
850

What is managed code and unmanaged code?

Managed code : Code executing under the control of the CLR is called a managed code. For example, any code written in C# or Visual Basic .NET is managed code. Unmanaged code: Code that runs outside the CLR is referred to as “unmanaged code.” COM components, ActiveX components, and Win32 API functions are examples of […]

Read More
718

What is boxing and unboxing?

Boxing: Boxing is the process of converting a Value type to the Reference type. When the CLR boxes a value type, it wraps the value inside a System.Object and stores it on the managed heap. Boxing is implicit. For example, the integer variable i is boxed and assigned to object j. int i = 1; obj j = i;   […]

Read More