Aslam-0-Alaikum
What is the real use of Indexers in c#.....?
Indexers
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
VulpesRank #55 · 29.2K reputationPosted Mar 16, 2011, 12:58 AM EDT
Where the containing class is some kind of collection, the indexer allows you to access individual items of the collection using an index. The index need not be integer but could, for example, be a string if you wanted to access an item by its name rather than its position.
Suthish NairRank #92 · 22.8K reputationPosted Mar 16, 2011, 12:25 PM EDT