Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Whats an assembly? Describe the importance of assembly?

906


How to implement a singleton design pattern in c#?

880


What are the principles of delegation?

940


How do you prevent a class from being inherited in c#?

843


What is a method signature in c#?

927


Why we use extension methods in c#?

878


What is icomparable in c#?

956


Is int reference type c#?

975


what are the contents of an assembly ?

986


What is bitwise operator in c#?

929


What is the difference between c and c# programming?

951


Will the following code compile and run?

981


What is the difference between delegates and events in c#?

989


What is lazy class in c#?

863


Explain About Postback

932