Geeks With Blogs
Abhishek Anand Bits & Bytes about .net technology framework. properties
Properties vs. Methods
One of the decisions a developer needs to make while designing a class is when to use a property and when to use a method. Methods typically represent an action or an operation whereas, properties represent pieces of data associated with a class / instance. Properties are typically used to allow accessibility (getting and/or setting) to private class fields. Cases where the use of a property is recommended: Ø When the member represents a logical attribute of the type. E.g. Message is a property of ......

Posted On Wednesday, November 20, 2013 4:31 PM

Copyright © Abhishek Anand | Powered by: