Do C# 8 default interface implementations allow for multiple inheritance

Your question is answered by Mads Torgersen in the blog post you linked to: Actually interfaces are still quite far from abstract classes. Classes don’t inherit members from interfaces, so if a class leaves a member M implemented by the interface, the class does not have a member M! It’s like an explicit implementation today; … Read more

Calling C# interface default method from implementing class

See the documentation at https://learn.microsoft.com/en-us/dotnet/csharp/tutorials/default-interface-members-versions That cast from SampleCustomer to ICustomer is necessary. The SampleCustomer class doesn’t need to provide an implementation for ComputeLoyaltyDiscount; that’s provided by the ICustomer interface. However, the SampleCustomer class doesn’t inherit members from its interfaces. That rule hasn’t changed. In order to call any method declared and implemented in the … Read more

How would you implement a “trait” design-pattern in C#?

You can get the syntax by using marker interfaces and extension methods. Prerequisite: the interfaces need to define the contract which is later used by the extension method. Basically the interface defines the contract for being able to “implement” a trait; ideally the class where you add the interface should already have all members of … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)