Real world use cases for C# indexers?

后端 未结 14 1492
时光说笑
时光说笑 2020-12-04 15:26

I\'ve seen lot of examples for c# Indexers, but in what way will it help me in real life situations.

I know the C# guru wouldn\'t have added this if it wasn\'t a ser

14条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-04 15:53

    It is just syntactical sugar for collection type classes. I never had a reason to write such a class. So I think there are very rare uses of it in "real life", because the classes using it are already implemented.

提交回复
热议问题