Which of the following statements is correct about an interface used in C#.NET?
Which of the following statements is correct about an interface?
Which of the following statements are correct about an interface in C#.NET?
Which of the following is the correct implementation of the interface given below?
interface IMyInterface
{
double MyFun(Single i);
}class MyClass
{
double MyFun(Single i) as IMyInterface.MyFun
{
// Some code
}
}class MyClass
{
MyFun (Single i) As Double
{
// Some code
}
}class MyClass: implements IMyInterface
{
double fun(Single si) implements IMyInterface.MyFun()
{
//Some code
}
}class MyClass: IMyInterface
{
double IMyInterface.MyFun(Single i)
{
// Some code
}
}Which of the following statements is correct?
Which of the following statements are correct about an interface used in C#.NET?
Which of the following statements is correct about the C#.NET code snippet given below?
interface IMyInterface
{
void fun1();
int fun2();
}
class MyClass: IMyInterface
{
void fun1()
{ }
int IMyInterface.fun2()
{ }
}Which of the following can implement an interface?
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
}
}Which of the following can be declared in an interface?
Which of the following statements is correct about the C#.NET code snippet given below?
interface IPerson
{
String FirstName
{
get;
set;
}
String LastName
{
get;
set;
}
void Print();
void Stock();
int Fun();
}A class implements two interfaces each containing three methods. The class contains no instance data. Which of the following correctly indicate the size of the object created from this class?
Which of the following is the correct way to implement the interface given below?
interface IPerson
{
String FirstName
{
get;
set;
}
}class Employee : IPerson
{
private String str;
public String FirstName
{
get
{
return str;
}
set
{
str = value;
}
}
}class Employee
{
private String str;
public String IPerson.FirstName
{
get
{
return str;
}
set
{
str = value;
}
}
}class Employee : implements IPerson
{
private String str;
public String FirstName
{
get
{
return str;
}
set
{
str = value;
}
}
}Which of the following statements is correct about an interface used in C#.NET?
Which of the following statements is correct about Interfaces used in C#.NET?