Click here to Skip to main content
15,888,579 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi Everybody,

The Basic Question arising in my mind. So I want to discussed with you.

Question : What is the Difference Between Method and Property.
Expect (Number of Prameter in Method and Return Type)

Where we need to Use Method/Property.
Because we can also set the value by using method and method also return the value.


I need to know that is there any Performance issue or Standers for writing the Method/Property.
Posted
Updated 16-Jul-13 1:33am
v3
Comments
[no name] 16-Jul-13 7:24am    
"Microsoft Certified Professional" and you are asking this?
Anubhava Dimri 16-Jul-13 7:32am    
Yes Sir. Actually i need to know that is there any Performance issue.
[no name] 16-Jul-13 7:33am    
No you do not and that is not what you asked. An MCP would not be asking this to being with.
Anubhava Dimri 16-Jul-13 7:35am    
ok sir, I am improving the question.
Richard MacCutchan 16-Jul-13 7:35am    
A Method does some action which affects the application, and may return a result. A Property is a value which can be set or returned, but does not do anything. To be accurate a property may raise an event when it is changed to signal the application that its value has changed.

You may find a good answer at Stack Overflow (and even there it was marked as 'duplicate' question): Difference between Property and Method [duplicate][^].
 
Share this answer
 
A Method does some action which affects the application, and may return a result. A Property is a value which can be set or returned, but does not do anything. To be accurate a property may raise an event when it is changed to signal the application that its value has changed.
 
Share this answer
 
Your method will contain the datatypes needed for taking the values and adding it. How do you add it by the way?Simple. You use the defined property of addition or use get{} set{} property to define a user required property for addition. Once this is defined the function will possess the property defined and that property is applied to the values inserted by you.


reference

http://in.answers.yahoo.com/question/index?qid=20130129075946AAS0Ezx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900