Понимаю, что вопрос флеймовый, но все же.
В C# 8 появились Default implementations of interface members
interface ILogger
{
void Log(LogLevel level, string message);
void Log(Exception ex) => Log(LogLevel.Error, ex.ToString()); // New overload
}
class ConsoleLogger : ILogger
{
public void Log(LogLevel level, string message) { ... }
// Log(Exception) gets default implementation
}
В чем теперь будет отличие Interface от abstract class?
DI в asp.net core требует интерфейс. Теперь получается абстрактные классы не нужны и можно везде использовать интерфейсы?