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 difference between private and protected?

0 Answers  


Is javascript harder than c#?

0 Answers  


Which of these statements correctly declares a two-dimensional array in c#?

0 Answers  


Explain about Protected and protected internal, ?internal? access-specifier?

7 Answers  


Why we use get set in c#?

0 Answers  






Why do we use methods in c#?

0 Answers  


What is a delegate, why should you use it and how do you call it ?

1 Answers  


What is the difference between “dispose” and “finalize” variables in c#?

0 Answers  


Why we use dll in c#?

0 Answers  


Define interface class in c#?

0 Answers  


What is the relationship between a process, application domain, and application?

0 Answers  


C# called c sharp why?

0 Answers  


Categories