locked
indexer RRS feed

  • Question

  • how can define an unlimited indexer in c# ?
    Wednesday, November 30, 2011 12:06 PM

Answers

  • Hi,

    can you describe, what you mean with "unlimited indexer"?

    If you look into http://msdn.microsoft.com/en-us/library/6x16t2tx.aspx, then you might think that an indexer is limited, because in the example, the indexer is "only" an integer and internally it accesses an array of 100 elements only ...

    But you can have an indexer, that takes an argument of object and then decides individually what to do (based on the type).

    With kind regards,

    Konrad

    • Marked as answer by Mr. Wharty Wednesday, February 15, 2012 11:50 PM
    Wednesday, November 30, 2011 12:44 PM
    Answerer

All replies