Developer forum

Forum » Ecommerce - Standard features » Accessing array index

Accessing array index

Esben Kvorning
Reply

Hi there,

I need to access the first item of a VariantCombinations loop and I've been told by a colleague that this should be possible using a kind of array notation - i.e. VariantCombinations[0] or similar.

I haven't been able to find any documentation on this anywhere (forum, template tag reference etc.).

Is there anyone who can help?

/ Esben


Replies

 
Nicolai Høeg Pedersen
Reply

Hi Esben

You could have a look at the API documentation:

http://developer.dynamicweb-cms.com/api8/#Dynamicweb~Dynamicweb.eCommerce.Variants.VariantCombinationCollection.html

From that you can see that it inherits System.Collections.ObjectModel.Collection(Of T) from the .net framework:

http://msdn.microsoft.com/en-us/library/ms132397(v=vs.100).aspx

So VariantCombinations.Item(0) should do the trick.

BR Nicolai

 

You must be logged in to post in the forum