interface a
{
Method1()
Method2()
}
class b: a
{
override Method1()
override Method2()
}

what will happen & why?

Answer Posted / vijayakumar

It will throw an error bcz

1.override Key word not use with interface

correct ans :


class b : a
{
public void Method1()
{

}
public void Method2()
{

}
}

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are types in c#?

593


What is Covariance and contravariance in C#?

639


What is yield c#?

558


What is the file extension for c#?

594


What is the benefit of using interface in c#?

578






What is an enumerator in c#?

612


What is the use of protected in c#?

598


Explain how many types of exception handlers are there in .net?

569


What is the use of base keyword? Tell me a practical example for base keyword’s usage?

618


What are the types of comments in c#?

644


Why we use methods in c#?

629


What are the 3 types of comments in c#?

618


What is the use of ienumerable in c#?

636


Define an array?

606


Explain about Oops concept

628