1

We all know that we can define default methods in Interface for C# 8.0 plus version.

The below code works fine for 8+ version.

    interface I1
    {
        bool Method1()
        {
            return true;
        }
        bool Method2()
        {
            return false;
        }
    }

That is the difference between abstract class and interface in C# 8.0 + version point of view?

I know the difference between these for previous C# version. I want a clarity for C# 8.0 plus version. Can you pls guide?

BZKN
  • 1,499
  • 2
  • 10
  • 25
Amar
  • 19
  • 1
  • 2
  • Multiple inheritance is possible with interfaces, but there are some problems with overrides in classes (for [example](https://stackoverflow.com/a/62334580/2501279)) and I would say that managing state still is up to classes. – Guru Stron Apr 19 '21 at 18:52
  • https://jeremybytes.blogspot.com/2020/10/abstract-classes-vs-interfaces-in-c.html#:~:text=Abstract%20class%20members%20can%20have,public%20and%20cannot%20be%20changed.&text=In%20C%23%208%20interface%20members%20can%20have%20access%20modifiers.&text=But%20interfaces%20can%20now%20have,from%20within%20the%20interface%20itself. – Aldert Apr 19 '21 at 18:55

0 Answers0