London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
AI OnAI Off
London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
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 ;)