Browse by Topic

Popular

Latest

Latest Posts

Diagram illustrating C# virtual method dispatch from a call site to the method table and the selected override.
C#

C# Virtual Method Dispatch Explained

c# virtual method dispatch: Understand how C# virtual method dispatch works at runtime, its performance cost, and when to use virtual methods effectively.

virtual methodsmethod dispatchpolymorphismruntime binding
A diagram showing a base class reference pointing to derived objects with dynamic method resolution at runtime.
C#

C# Runtime Polymorphism: Virtual Methods and Interfaces

Learn how C# runtime polymorphism uses virtual methods and interfaces to dispatch calls at runtime, including vtable mechanics, performance tradeoffs, and design guidance.

PolymorphismVirtual MethodsInterfacesDynamic Dispatch
Diagram showing a base class reference pointing to a derived class instance in C#.
C#

C# Base Type Reference to Derived Object

c# base type reference derived object: Learn how a C# base type reference can hold a derived object, how virtual dispatch works, and when to cast or use pattern matching.

C#polymorphismtype castinginheritance
A visual representation of C# polymorphism showing a base type reference pointing to multiple derived object types
C#

C# Polymorphism: Overloading, Overriding, and Interfaces

c# polymorphism: Learn how C# polymorphism works through method overloading, virtual dispatch, abstract classes, and interfaces, with practical examples and design gui...

C# polymorphismvirtual dispatchmethod overloadinginterfaces
Diagram comparing C# method overloading with compile-time binding and method overriding with runtime dispatch through inheritance.
C#

C# Overloading vs Overriding: Key Differences

Understand the difference between C# overloading and overriding: syntax rules, compile-time vs runtime binding, and when to use each technique.

method overloadingmethod overridingpolymorphismvirtual methods
Diagram showing a base class method being overridden by a derived class in C#
C#

C# Method Overriding: Syntax, Behavior, and Pitfalls

Understand C# method overriding with practical code examples covering virtual and override keywords, runtime dispatch, base calls, and common mistakes.

C#PolymorphismVirtual MethodsInheritance
Diagram comparing C# new and override behavior in inheritance, showing method resolution through base class references.
C#

C# new vs override: Choosing Between Method Hiding and Overriding

Understand the difference between the C# new and override keywords, when to use each, and how they affect polymorphism and runtime behavior.

C#inheritancemethod hidingoverride
Diagram showing a base class method being hidden by a derived class method with the new modifier in C#
C#

C# New Method Hiding: Syntax and Runtime Behavior

Understand C# method hiding with the new modifier: syntax, runtime dispatch behavior, differences from overriding, and when hiding is a deliberate design choice.

C#method hidinginheritancepolymorphism
A diagram showing a base class method marked virtual and a derived class method marked override, with an arrow indicating dynamic dispatch at runtime.
C#

C# virtual vs override: What Each Modifier Does

The difference between C# virtual and override, when to use each, and how they affect method dispatch in derived classes.

virtualoverridepolymorphisminheritance
Diagram showing a base class method being overridden by a derived class with the override keyword.
C#

C# Override Keyword: How to Use It

Learn how the C# override keyword works with virtual methods, when to use it instead of new, and how to handle base calls, sealing, and overriding object members.

C#inheritancepolymorphismvirtual methods