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

what will happen & why?

Answer Posted / arun

A compile time error will be thrown as there exist no
methods to override. The methods in the interface are just a
contract.
To override any method, it should be defined as virtual.

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What the different phase/steps of acquiring a proxy object in webservice?

468


Does c# have a 'throws' clause?

575


why delegate is type safe?

2599


Explain about Error handling and how this is done

532


Can we have only “try” block without “catch” block in c#?

475






Is array a list?

487


What is a static class in c#?

504


Why c# is called c sharp?

461


In a site to turn off cookies for one page which method is followed?

505


What is difference between C# and VB.NET?

512


How do you define a predicate?

484


How can i Spawn a Thread

523


Explain how to implement delegates in c#.net

499


What is a cshtml file?

532


Name the connections does microsoft sql server support?

481