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 a class level variable in c#?

923


What do you mean by casting a data type?

882


What is the base class from which all value types are derived?

884


How many types of interface are there in c#?

913


What is use of a HashTable in .NET?

1091


What is task parallel library?

957


What is the best dependency injection c#?

827


Explain the difference between arraylist and array and in c#?

890


How do you inherit a class into other class in c#?

861


How to block a class from being inherited further?

857


What is the difference between field and variable in c#?

933


How long can a string be c#?

846


What is cookies in c# asp net?

883


What is the use of functional interface?

862


Why do we overload constructors?

848