Link to home
Start Free TrialLog in
Avatar of mathieu_cupryk
mathieu_cuprykFlag for Canada

asked on

accesses the indexer property

Which one of the following code samples accesses the indexer property of the
customers collection?

1) customers.Item[1].Name
2) customers.(1).Name
3) customers.[1].Name
4) customers.Item(1).Name
5) customers[1].Name

Answer: 1)
ASKER CERTIFIED SOLUTION
Avatar of kprestage
kprestage

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Gautham Janardhan
Gautham Janardhan

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Gautham Janardhan
Gautham Janardhan

2 and 3 are invalid and

 u cant say any thing abt 1 and 4 b'coz we cant term them AS ivvalid because in case 1 Customers may contain an object 'Item' which may be indexed
and for case 4 customer may contain a function 'Item' which accepts an int and returns an object which may have a property Name..