locked
Abstract, Interface, Derived class RRS feed

  • Question

  • internal interface ISample

    {

      void Add(int x, int y);

    }

     


    internal abstract class SampleAbstract

    {

      abstract void Add(int x, int y)

    }

     


    internal class Sample : ISample, SampleAbstract

    {

      public override void Add(int x, int y)
      {
      }

    }

     

    Why does the above code compile? I have not implemented the interface method but override the abstract method in derived class.. Is it a bug or methods inside the interface are pure virtual functions dont have to explictly declared as abstract.. 


    Ashok Kumar M
    • Moved by CoolDadTxModerator Thursday, April 29, 2010 3:54 PM Not IDE related (From:Visual C# IDE)
    Thursday, April 29, 2010 3:33 PM

Answers

All replies