Home / C# Programming / Interfaces :: Discussion

Discussion :: Interfaces

  1. Which of the following statements is correct about the C#.NET code snippet given below?

    
     interface IMyInterface 
     {  
         void fun1();  
         void fun2(); 
     } 
     class MyClass: IMyInterface 
     {   
          private int i;    
          void IMyInterface.fun1()     
          {       
             // Some code 
          }
       }
    

  2. A.

    Class MyClass is an abstract class.

    B.

    Class MyClass cannot contain instance data.

    C.

    Class MyClass fully implements the interface IMyInterface.

    D.

    Interface IMyInterface should be inherited from the Object class.

    E.

    The compiler will report an error since the interface IMyInterface is only partially implemented.

    View Answer

    Workspace

    Answer : Option E

    Explanation :

    No answer description available for this question.


Be The First To Comment