JetBrains Rider
 
Get JetBrains Rider
Get your hands on the new features ahead of the release by joining the Early Access Program for Rider 2025.1! Learn more

Convert Indexer to Method refactoring

Last modified: 23 September 2024

This refactoring helps you convert one or both accessors of an indexer into methods and update usages of the indexer in the current solution accordingly.

In the example below JetBrains Rider converts both getter and setter accessors of the indexer and updates the usage:

JetBrains Rider refactorings: Convert indexer to method