Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumC#extension methodsSingle-choice MCQ

An instance method and an extension method have the same name and a compatible signature for a given receiver. Which one does the compiler bind to?

class Widget { public string Describe() => "instance"; } static class Ext { public static string Describe(this Widget w) => "extension"; } var s = new Widget().Describe();