Tryst

Hi all,

I have picked up a project that was developed by somebody else, and would like to know what one of the code statements in the project is doing.

The code is as follows...

this.customerTemplate = CacheContainer.Customer(this.userName)[CacheContainer.AllTemplates,this.package,this.operation,this.country];

I need to know what is happening within the square brackets (highlighted red) after the method call.

Thanks. Tryst.



Re: Visual C# General What is happening after the method call...

Tryst

I have since found out the following...

CacheContainer.Customer returns the following type (GD_CustomerConfigurationSystem), and having looked up this Class, I can see there is a method defined as the following, where the four parameters match the four passed in parameters within the square brackets of my previous post...

public DataRow this[DataTable allTemplates,string templateName,string operation,string country]
{ }

I am still confused by the functionality of what I posted in my last post, but was hoping that these latest findings may help someone explain to me.

Thanks.







Re: Visual C# General What is happening after the method call...

Peter Ritchie

It's calling a four-parameter indexer get accessor of the type returned by the Customer method.