9   properties & indexers
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

9 properties & indexers

on

  • 1,151 views

 

Statistics

Views

Total Views
1,151
Views on SlideShare
1,151
Embed Views
0

Actions

Likes
0
Downloads
21
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

9 properties & indexers Presentation Transcript

  • 1. Properties and Indexers Programming in C# tnngo2@gmail.com
  • 2. Properties
  • 3. 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.
  • 4. Get & Set accessors https://gist.github.com/2391947
  • 5. Types of Properties
  • 6. Difference between Properties and Fields
  • 7. Difference between Properties and Methods
  • 8. 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
  • 9. Indexers
  • 10. 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
  • 11. Implementation https://gist.github.com/2398898
  • 12. Difference between Properties and Indexers