interface a
{
Method1()
Method2()
}
class b: a
{
override Method1()
override Method2()
}
what will happen & why?
Answer Posted / nithya
It will through the error because
in interface,the methods should have return type for them.
And we can create only implementation for the methods
available in interface. We cannt override it.
And Virtual/Abstarct or not a valid items in interface.
We must implement the methods available in interface.
interface a
{
void Method1();
void Method2();
}
class b: a
{
public void Method1();
public void Method2();
}
Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is difference between assembly and dll?
What is uint16?
Explain what is copy constructor?
Why is c# good for games?
How do you prevent a class from being inherited in c#?
What is the difference between readkey and readline in c#?
What is a string in c#?
Why do we need to serialize data?
Why do we need static in c#?
What is a dimensional array?
What is inheritance in csharp?
What is serialization in unity?
Wht executescaler method is used?
What is the difference between c and c sharp?
What is a nullreferenceexception?