Upload
tuan-ngo
View
1.017
Download
1
Embed Size (px)
Citation preview
Properties
Properties ( smart fields)
ensure accuracy and validity of values of fields.
Use of properties Modifies private values
Validates private values
Performs required actions
Implements abstraction and encapsulation.
Types of Properties
Difference between Properties and Fields
Difference between Properties and Methods
Real world use cases of properties
Lazy Initialization http://www.codeproject.com/Articles/275932/Lazy-Loading-in-Csharp
Dirty Tracking
http://stackoverflow.com/questions/33469/caching-patterns-in-asp-net
Indexers
Indexers
are data members that allow access data within objects in a way
similar to accessing arrays.
fast access to the data within an object as they help in indexing the data
called smart arrays
Difference between Properties and Indexers