Simple explanation of Indexer
thanks reading question!
please want understand concept of in simple form
1) isindexer
2) example of indexer: int , string
3) why 1 should use indexer if have array or property already.
4) object oriented significant of indexer? imp answer thanks
please try make simple. thanks!
hi bhattumang
indexers way access arrays in .net. indexers defined properties, except accept parmeter, return selected value. can see simple example here: http://msdn.microsoft.com/en-us/library/vstudio/6x16t2tx.aspx. indexers not ment replace array, how arrays accessed. should consider writing own indexer if reason want rewrite array, or if want access array not index of items (but according string or custom item). these aren't common solutions , should consider whether need them.
also see: http://msdn.microsoft.com/en-us/library/vstudio/2549tw02.aspx (for second question)
and: http://msdn.microsoft.com/en-us/library/vstudio/4bsztef7.aspx (for third question)
regards
yoni
Visual Studio Languages , .NET Framework > Visual C#
Comments
Post a Comment