Interfaces

Q1:
Which of the following is the correct implementation of the interface given below?
interface IMyInterface
{ 
    double MyFun(Single i);
}

A
class MyClass
{
    double MyFun(Single i) as IMyInterface.MyFun
    {
        // Some code
    }
}

B class MyClass { MyFun (Single i) As Double { // Some code } }

C
class MyClass: implements IMyInterface
{
    double fun(Single si) implements IMyInterface.MyFun()
    {
        //Some code
    } 
}

D
class MyClass: IMyInterface
{
    double IMyInterface.MyFun(Single i)
    {
        // Some code
    } 
}

ANS:A -

class MyClass
{
    double MyFun(Single i) as IMyInterface.MyFun
    {
        // Some code
    }
}

No answer description is available. Let's discuss.



img not found
img

For help Students Orientation
Mcqs Questions

One stop destination for examination, preparation, recruitment, and more. Specially designed online test to solve all your preparation worries. Go wherever you want to and practice whenever you want, using the online test platform.