Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C# (http://www.go4expert.com/forums/c-sharp/)
-   -   Purpose of having Properties in Interface (http://www.go4expert.com/forums/purpose-properties-interface-t3730/)

visualcpp 3Apr2007 16:40

Purpose of having Properties in Interface
 
Hai!
I couldn't understand the purpose of having Properties in interface. If any one having clear information about this, please share it.

Thanks in advance!

Regards,
visualcpp

shabbir 3Apr2007 17:03

Re: Purpose of having Properties in Interface
 
Its same as the get set methods that we used to write in old days. To share the values of the variables to the outside world

visualcpp 3Apr2007 17:44

Re: Purpose of having Properties in Interface
 
Yes. I understand the purpose and concept of properties. That is perfectly ok for class's. Why should we have properties in interface as it doesn't contain any memberdata to wrap around (like class's)?

shabbir 3Apr2007 18:31

Re: Purpose of having Properties in Interface
 
Quote:

Originally Posted by visualcpp
Yes. I understand the purpose and concept of properties. That is perfectly ok for class's. Why should we have properties in interface as it doesn't contain any memberdata to wrap around (like class's)?

You can always have a data in a class which can be stored.

Its something like writing the get set methods/


All times are GMT +5.5. The time now is 00:13.