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

How long does a loop recorder procedure take?

520


Can we inherit class that contains only one private constructor?

517


Why static variables are used?

522


What is the difference between selection and projection?

451


What is a cs file?

522






What problem does Delegate Solve?

568


Why abstract class can not be instantiated?

452


Why is aws serverless?

500


What is the base class in .net from which all the classes are derived from?

508


Hi Friends, I am going through Siemens Interview Procedure from last 1+1/2 months. I went through 1 written + 2 Technical + 1 Managerial Round process after which I got call from HR informing that "you are selected and we would like to meet you for HR round". HR round was very nominal compared to MR. HR Round last for hardly 5 mins. They told me that you will get the final result on Friday. Still I have not received any feedback from them. Please help!!!

16615


Explain how to implement an object pool in c#.net

526


What is difference between continue and break in c#?

481


What is icollection in c#?

519


Explain the difference between Response.Write () and Response.Output.Write ().

528


Explain states of a thread in c#?

528