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

Explain how to parse a datetime string?

669


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

662


What is an abstract class c#?

670


How does foreach loop work in c#?

676


Explain About Assembly in .NET, types of assemblies, their difference, How to register into GAC. How to generate the strong names & its use.

790


What is a framework in c#?

658


Which debugging tools you can use in the .NET ssSDK?

743


Explain about Oops concept

712


Describe the overview of clr integration.

665


What are boxing and unboxing?

699


What is difference between an reference type and value type in C#?

788


Can non-default constructors be used with single call sao?

710


What is difference between ienumerable and list in c#?

632


Can var be null c#?

624


What is foreach loop in c#?

711