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 is class method c#?

879


Are c# destructors the same as c++ destructors?

1096


What is array formula?

888


Are arrays immutable c#?

1031


What is orm in c#?

941


What is generic method in c#?

919


Is c# strongly typed?

833


Can we have 2 main methods in c#?

888


What is the system namespace?

892


What is executereader in c#?

881


What is difference between assembly and dll?

954


How do I move from one form to another in c#?

871


Define Virtual folder?

1000


In which way you can convert a value-type to a reference-type?

952


What is int16?

896