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 properties and indexer?

Answer Posted / soft.narayan@gmail.com

This answer posted by me soft.narayan@gmail.com,If u have
any query please let me know......

Using an object like an array is called Indexer.
Indexer is similar to properties.Indexer is a collection of
set and get procedures.Indexer name must be "this" only.
One class can have only one indexer.

Syntax to create Indexer:
string s
public string firstname
{
set{ s=value;}
get (return s;}
}

string[] x=new string[5];
public string this[inti]
{
set {x[i]=value}
get { return x[i]}
}
}

Is This Answer Correct ?    9 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the Types of values mode can hold session state in web.config

1005


Why to use lock statement in c#?

937


How do you serialize in c#?

857


What is dbcontext c#?

1001


What are access modifiers used for?

1086


What is difference between write and writeline?

903


Explain the difference between abstract class and interface in .net?

910


how to print invert pyramid in c#

1770


What are c# i/o classes?

1017


Explain the top reason to use c# language?

945


Can we override interface method?

975


What is dependency in software?

948


Can interface inherit class in c#?

977


What is pure abstract class in c#?

904


What do you mean by saying a "struct is a value type"?

921