Declare an interface and implement it : Interface : Class C# Examples


C# Examples » Class » Interface »

 

Declare an interface and implement it









    
interface  IMyIF  {  
    int  myMeth(int  x);  
}

class  MyClass  :  IMyIF  {  
    int  IMyIF.myMeth(int  x)  {  
        return  x  /  3;  
    }  
}
    
   
  
   




HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Class
» Interface