Try our conversational search powered by Generative AI!
AI OnAI Off
foreach(string propertyName in this.CurrentPage.Property)
{
PropertyData pd = this.CurrentPage.Property[propertyName];
//do your stuff
}
The PropertyDataCollection is based on the .NET type NameObjectCollectionBase therefore inheriting it's behaviour. I've heard feedback before that this is not intuitive but this collection is a core concept so we cannot change it's behaviour (even if we would like to).
http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemcollectionsspecializednameobjectcollectionbaseclasstopic.asp?frame=true
foreach(PropertyData pd in this.CurrentPage.Property){}
This is just one example of an enumerator that behaves like this, I'm pretty new to EPiServer (just worked with it a few weeks) so I maybe missunderstand the object model so please correct me if I'm wrong on this ;)