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

How do I edit a dll file?

823


Why do we need delegates?

824


What is a generic class?

913


Does c# have its own class library?

913


If casting fails what type of exception is thrown?

816


What is signature c#?

864


If you want to write your own dot net language, what steps you will u take care?

922


Is lazy thread safe c#?

832


What is asp net in c#?

903


What is CASPOL?

991


What are the generation of Garbage Collection in C# .NET ?

912


Can we store different data types in arraylist in c#?

860


What is iformatprovider in c#?

865


Is nullable type c#?

878


How many bytes is a char c#?

833