Indexers in c#?

Answer Posted / supraja

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.

The following is syntax

<modifier> <return type> this [argument list]
{
get
{
// Get codes goes here
}
set
{
// Set codes goes here
}
}

Is This Answer Correct ?    37 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Does c# support multiple inheritance (mi)?

526


What is cookies c#?

483


What is JIT (just in time)? how it works?

549


how to implement a web service in .net

468


What is a dictionary in c#?

492






What is the difference between select and selectmany?

431


Define MSIL, and how does it works? Why our developers need an appreciation of it if at all?

500


How do you specify a custom attribute for the entire assembly (rather than for a class)?

523


Is arraylist faster than linkedlist?

489


What is multiple interface in c#?

513


What is int64 in c#?

495


What is difference between class and abstract class in c#?

457


Explain Direct CAST vs CType ?

552


What is a web service in c#?

579


How many types of delegates are there in c#?

460