How to break a list into chunks based on some property?

Posted by CurlyFro on Stack Overflow See other posts from Stack Overflow or by CurlyFro
Published on 2010-04-22T17:22:41Z Indexed on 2010/04/22 17:23 UTC
Read the original article Hit count: 170

Filed under:
|
|
public class InvestorMailing
{
    public string To { get; set; }

    public IEnumerable<string> Attachments { get; set; }

    public int AttachmentCount { get; set; }

    public long AttachmentSize { get; set; }
}

i have an IList<InvestorMailing> mailingList. if the attachment size is greater than x, then i need to split my list and break it into chunks. is there an easy linq-y way to do this?

© Stack Overflow or respective owner

Related posts about LINQ

Related posts about ASP.NET