What is indexers in C#
Answers were Sorted based on User's Feedback
Answer / satish
C# introduces a new concept known as Indexers which are
used for treating an object as an array. The indexers are
usually known as smart arrays in C# community. Defining a
C# indexer is much like defining properties. We can say
that an indexer is a member that enables an object to be
indexed in the same way as an array.
| Is This Answer Correct ? | 18 Yes | 3 No |
Answer / abdul razack
n c# introduce new concept is Indexer. This is very useful for some situation. Let as discuss something about Indexer.
Indexer Concept is object act as an array.
Indexer an object to be indexed in the same way as an array.
Indexer modifier can be private, public, protected or internal.
The return type can be any valid C# types.
Indexers in C# must have at least one parameter. Else the compiler will generate a compilation error.
| Is This Answer Correct ? | 6 Yes | 1 No |
Answer / aby
Indexer enables an object to be
indexed in the same way as an array.
| Is This Answer Correct ? | 3 Yes | 1 No |
Answer / anil
Indexers are Location indicators and are used to access
class objects, just like elements in an array. They are
useful in cases where a class is a container for other
objects.
1.Indexer takes an Index argument and looks like an Array.
2.Indexer is declared using the name this.
| Is This Answer Correct ? | 3 Yes | 1 No |
why C#.net doesnot support prcedures and why it supports structs,functions
How does dictionary work in c#?
How will you get the different language strings?
What is difference between ienumerable and list?
How assembly versioning in .NET prevent DLL Hell problem?
What is the difference between constants and read-only?
What is a delegate?
Wcf and what is difference between wcf and web services?
What?s the C# equivalent of C++ catch (?), which was a catch-all statement for any possible exception?
Why do we need ienumerable in c#?
What is the difference between arraylist and list in c#?
Where are all .NET Collection classes located ?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)