mercredi 25 mars 2015

C# select from list by object type


Vote count:

0




Structure of my project:



class Attachment { ... }
class Photo : Attachment { ... }
class Document : Attachment { ... }

class Page
{
public List<Attachment> attachments;
...
}


I receive pages from the server:



List<Page> pages = ...load pages from server;


I need to get from this list pages which in the Attachments have only objects with type Photo.


How can I do it? Thanks.



asked 40 secs ago







C# select from list by object type

Aucun commentaire:

Enregistrer un commentaire