abstract class with three virtual methods : Abstract Class : Class C# Examples


C# Examples » Class » Abstract Class »

 

abstract class with three virtual methods









    
public  abstract  class  MyOperations
{
        public  virtual  void  Operation1()  {
        }

        public  virtual  void  Operation2()  {
        }

        public  virtual  void  Operation3()  {
        }
}

public  class  MyClass  :  MyOperations
{
        public  override  void  Operation1()  {  }
        public  override  void  Operation2()  {  }
}

public  class  MainClass
{
        public  void  DoWork(  MyOperations  ops  )  {
                ops.Operation3();
        }
}
    
   
  
   




HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Class
» Abstract Class