Microsoft LINQ

From Richard's Wiki
Jump to: navigation, search
using System.Collections.Generic;
using System.Linq;
using Model.Entity;
namespace Util
{
   public static class RatesWorksheetSectionExtensions
   {
       public static IEnumerable<RatesWorksheetSection> Flatten(this IEnumerable<RatesWorksheetSection> source)
       {
           return source.Concat(source.SelectMany(p => p.Children.Flatten()));
       }
   }
}