Photos class?

Topics: Developer Forum, User Forum
Mar 26, 2010 at 1:23 AM
Edited Mar 26, 2010 at 1:24 AM

The FlickrNet.Photos class seem to have been removed from the current release. Is it so that FlickrNet.PhotoCollection should be used instead of Photos?

Coordinator
Mar 26, 2010 at 7:11 AM

Correct - the Photos class has simply been renamed to PhotoCollection. However previously the Photos class had a PhotoCollection property which was how you accessed the photos - now you simly use the PhotoCollection class directly.

So...

 

Photos photos = flickr.PhotosSearch(...);
foreach(Photo photo in photos.PhotoCollection)
{
   // do something with photo...
}

becomes

 

PhotoCollection photos = flickr.PhotosSearch(...);
foreach(Photo photo in photos)
{
   // do something with photo...
}

Hope that helps.

 

 

Mar 28, 2010 at 9:08 PM
samjudson wrote:

Hope that helps.

Yup. Crystal clear :) Thanks for that.