Learn C#: How Do Virtual Methods Work?
Become a sponsor to access source code ► / zoranhorvat Join Discord server with topics on C# ► https://codinghelmet.com/go/discord Enroll course Beginning Object-Oriented Programming with C# ► https://codinghelmet.com/go/beginning... Subscribe ► / @zoran-horvat Do you know how C# knows which implementation of a virtual method to execute when you make a call to it? First, it is not C# - it is the .NET Runtime who decides. But that is the lesser problem. The question remains: How does .NET Runtime know which implementation to execute when you make a call to a virtual method on an object? We ask the same question about .NET Reflection, too. How does the GetType() method know the right type object to return when we call it on a reference to its base type? Such a confusion! This video dives into the structure of every instance of every reference type in .NET. You will learn about the type descriptor and the table of virtual methods - two fundamental traits of every object you instantiate. By understanding how method resolution works during run time, you will know everything about virtual methods in .NET and C# and any other object-oriented language, all the same. ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ ⚡️RIGHT NOTICE: The Copyright Laws of the United States recognize a “fair use” of copyrighted content. Section 107 of the U.S. Copyright Act states: “Notwithstanding the provisions of sections 106 and 106A, the fair use of a copyrighted work, including such use by reproduction in copies or phono records or by any other means specified by that section, for purposes such as criticism, comment, news reporting, teaching (including multiple copies for classroom use), scholarship, or research, is not an infringement of copyright." This video and our youtube channel, in general, may contain certain copyrighted works that were not specifically authorized to be used by the copyright holder(s), but which we believe in good faith are protected by federal law and the Fair use doctrine for one or more of the reasons noted above. #csharp #dotnet #objectorientedprogramming

The Lesson About GUID IDs I Learned the Hard Way

The Real Story Behind C# 15 Union Types

Why Favor Object Composition Over Class Inheritance? A Deep Dive

CIST2373 Final Project 2nd Attempt (Part #1)

Master the Design of Functional Types in C#

Fil-C: Garbage In, Memory Safety Out! - Filip Pizlo | SSW 2026

Nobody Explained the Schrödinger Equation Like THIS!

Turbo Pascal to Delphi. The Greatest IDE Story Ever Told

Avoid This Common Mistake in DDD Modeling

C#: Class, Struct or Record - Which Should You Choose?

CHOSEN ONE!! YOUR IDENTITY REVEAL JUST SHOOK THE INTERNET... AND THEIR MINDS

C# Full Course : C# Tutorial for Beginners

The Ultimate Guide to C# Records

Every C# Dev Uses Monads. Most Don't Know.

Let C# Tuples Become Your Best Friends

Learn Dependency Injection in less than 20 minutes! - C# DI - #csharp #dependencyinjection #net

C# Crash Course | The Ultimate C Sharp .NET Tutorial for Beginners

Creator of C++: Bell Labs, Negative Overhead Abstraction, Mistakes | Bjarne Stroustrup

Master the Builder Pattern: The King of Creational Design Patterns in C# | ASP.NET Core Tutorial

