What is indexers in C#

Answers were Sorted based on User's Feedback



What is indexers in C#..

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

What is indexers in C#..

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

What is indexers in C#..

Answer / aby

Indexer enables an object to be
indexed in the same way as an array.

Is This Answer Correct ?    3 Yes 1 No

What is indexers in C#..

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

Post New Answer

More C Sharp Interview Questions

What are generics in c#.net?

0 Answers  


Can we create multiple constructors?

0 Answers  


Can you prevent your class from being inherited and becoming a base class for some other classes?

3 Answers  


What is xor operation?

0 Answers  


What is a string? What are the properties of a string class?

1 Answers  






How can I use .NET components from COM programs?

0 Answers   DELL,


What are the classes contained in a single .NET DLL ?

0 Answers   Siebel,


How do you determine whether a string represents a numeric value?

0 Answers  


What language is c# similar to?

0 Answers  


Wht executescaler method is used?

0 Answers  


How many kinds of elements an array can have?

0 Answers  


What is writeline in c#?

0 Answers  


Categories