Month: March 2025

  • What are the four pillars of OOP?

    Encapsulation: Hiding data and implementation details. Achieved through access modifiers (public, private, protected). Inheritance: Creating new classes based on existing classes. Promotes code reuse. Polymorphism: Allowing objects to take on multiple forms. Method overloading (same name, different parameters). Method overriding (derived class provides a different implementation of a base class method). Abstraction: Focusing on essential features and hiding unnecessary…

    Read More: What are the four pillars of OOP?
  • What is the difference between == and .Equals()?

    ==: Checks for reference equality (whether two references point to the same object) for reference types and value equality for value types. .Equals(): Virtual method. Can be overridden to provide custom equality logic. Example:

    Read More: What is the difference between == and .Equals()?
  • What is boxing and unboxing?

    Boxing: Converting a value type to an object (reference type). Unboxing: Converting an object back to a value type. Example:

    Read More: What is boxing and unboxing?
  • What are events?

    Events are a mechanism for objects to notify other objects about actions or changes. They are based on delegates and follow a publisher-subscriber pattern.

    Read More: What are events?
  • What are delegates?

    Delegates are type-safe function pointers. They allow you to pass methods as arguments to other methods, enabling event handling and callback mechanisms. Type-safe function pointers. Purpose: Allow you to pass methods as arguments. Example:

    Read More: What are delegates?
  • What is garbage collection in .NET?

    Automatic memory management by the CLR. Process: Benefits: Prevents memory leaks and simplifies memory management.

    Read More: What is garbage collection in .NET?
  • What is the difference between value types and reference types?

    Value types: Example: Reference types:  Store a reference (memory address) to the data on the heap. Examples include string, class, and arrays. Assigning a reference type copies the reference, not the data itself. Example:

    Read More: What is the difference between value types and reference types?
  • What is the Common Language Specification (CLS)?

    A subset of the CTS that provides guidelines for language compilers.

    Read More: What is the Common Language Specification (CLS)?
  • What is the Common Type System (CTS)?

    The CTS defines the rules for declaring and using data types in .NET.Purpose: Ensures that different .NET languages can work together seamlessly. Key Aspects: Example: Both C# and VB.NET can use the int data type because it’s defined in the CTS.

    Read More: What is the Common Type System (CTS)?
  • What is the Common Language Runtime (CLR)?

    The CLR is the heart of the .NET execution environment. Think of it as a virtual machine that manages .NET applications. Key Functions:

    Read More: What is the Common Language Runtime (CLR)?