User Tools

Site Tools


notes:csharp:indexers

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
notes:csharp:indexers [2018/12/03]
leszek
notes:csharp:indexers [2018/12/03]
leszek
Line 9: Line 9:
   * can have separate access restrictions for setters and getters   * can have separate access restrictions for setters and getters
   * single-dimension indexers with numeric parameters can participate in data binding   * single-dimension indexers with numeric parameters can participate in data binding
 +
 +Keep in mind that:
 +  * '​get'​ accessors should not have observable side effects
 +  * when the JIT compiler inline property accessors, the performance of data members and properties is the same
  
 Example: Implement an indexer: Example: Implement an indexer:
notes/csharp/indexers.txt ยท Last modified: 2018/12/03 by leszek