What are the valid parameter types we can pass in an
Indexer ?

Answers were Sorted based on User's Feedback



What are the valid parameter types we can pass in an Indexer ?..

Answer / dileep

IN,OUT,INOUT are the valid parameter types that we can pass
in a Indexer

Is This Answer Correct ?    6 Yes 1 No

What are the valid parameter types we can pass in an Indexer ?..

Answer / guest

Hi,
This is Madhu from HYD..............

Indexer is same as property procedure.It provides array like
accessing.

Indexers are used to access the array of elements with
respect to object name. The name of Indexers always this.
Indexer can't be static.

EX:---
Public class demoindexer
{
int []a={10,20,30,40};
public int this[int index]
{
get
{
return a[index];
}
set
{
a[index]=value;
}
}
public static void main()
{
demo obj1;
obj1=new demo();
obj1.[0]--->10;
obj1.[1]--->20;
obj1.[2]--->30;
obj1.[3]--->40;
}
}

Is This Answer Correct ?    7 Yes 2 No

What are the valid parameter types we can pass in an Indexer ?..

Answer / anjum rizwi

Hi Dileep,

Can you plz give me the example of indexer?

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More C Sharp Interview Questions

What are the types of comments in c#?

0 Answers  


What is COM Interoperability?

0 Answers   DELL,


How do partial classes work in c#?

0 Answers  


1. Describe page life cycle?

3 Answers   Mphasis,


What is private void in c#?

0 Answers  






When a switch is said to be congested?

0 Answers   Wipro,


What Is An Interface Class?

0 Answers   Siebel Systems,


What is readline c#?

0 Answers  


What are custom exceptions?

0 Answers  


Can you inherit multiple abstract classes in c#?

0 Answers  


How do I create a new form in c#?

0 Answers  


How do namespaces work?

0 Answers  


Categories