Can property defined in Interface.

Answers were Sorted based on User's Feedback



Can property defined in Interface...

Answer / prashant k

Yes, We can define properties inside the interface without
implementation. e.g.

String GetName {get; set;}

Is This Answer Correct ?    21 Yes 0 No

Can property defined in Interface...

Answer / pramodgupta20

You can declare the property in interface and define it in
the class which implements the interface.

int GetUser{get; set;}

Is This Answer Correct ?    2 Yes 1 No

Can property defined in Interface...

Answer / nisha mac

yes you can declare the property inside interface but
implementation is mandatory otherwise it will throw error at
buid time saying you need to implement it.

Is This Answer Correct ?    0 Yes 0 No

Can property defined in Interface...

Answer / chandan kumar

No,We Can,t define property in Interface

Is This Answer Correct ?    1 Yes 17 No

Post New Answer

More C Sharp Interview Questions

What is the difference between static and constant variables?

0 Answers   Accenture,


How do I unload an assembly?

0 Answers  


Difference between dispose and destructor?

3 Answers   TCS,


What is the default value of date?

0 Answers  


Which are the loop types available in c#?

0 Answers  






Can you declare a class or a struct as constant?

0 Answers  


Which of the following operations can you not perform on an ado.net dataset?

0 Answers  


How to use delegates with events?

0 Answers  


What is the use of getcommandlineargs() method in c#.net?

0 Answers  


What is the difference between ref and out parameters in c#?

0 Answers  


What is difference between overloading and short circuiting?

0 Answers  


What is data annotation in c#?

0 Answers  


Categories