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 is extension method in c sharp?

480


Does unity use c++ or c#?

493


How does return work in c#?

506


Can arraylist store different data types in c#?

475


Why do we use interface in c#?

481






What is .cs file in c#?

523


What is the benefit of delegate in c#?

500


How long does a loop recorder procedure take?

520


Can a struct have a default constructor (a constructor without parameters) or a destructor in c#?

518


Is static class thread safe in c#?

470


Explain the difference between a sub and a function in c#.

530


What are the Types of JIT and what is econo-JIT

800


Why References are stored on heap and variables on stack?

507


Why is it called c sharp?

517


Is array passed by reference in c#?

516