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 } }

- Online Exam Test Papers | - MCQs[multiple choice questions and answers ] | - Mock Test Papers | - Practice Papers | - Sample Test Papers |

Question:
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
    } 
}

1.Class MyClass is an abstract class.

2.Class MyClass cannot contain instance data.

3.Class MyClass fully implements the interface IMyInterface.

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

Posted Date:-2021-02-25 10:11:55


More MCQS Questions and answers

Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!