Since C# 8.0, now we can have default implementation in interface. Does that mean there won't be any difference between interface and abstract class usage?
Asked
Active
Viewed 25 times
0
-
2The default implementation is only accessible if the object reference has the interface type. An abstract class will not have access to that implementation without an explicit cast (like with any explicit interface implementation). e.g., `((ITheInterface)this).SomeDefaultImplementation()` – Jeff Mercado Oct 21 '22 at 04:21