Group a customer list by enum and maximum number of items per enum

Dear Experts:
My need is to group a list of customers (List<Customer>) where Customer contains this enum
public enum CustomerType

Open in new window

grouped by type and number of items per type (in this case 50); for example if customers contain:
70  type1,
120  type2 and
51  type5
your answer should return a list of Dictionary objects like:
Object 1:
50  type1,
50  type2 and
50  type5
Object 2:
20  type1,
50  type2 and
1  type5
Object 3:
50  type2
Note: Basically the Dictionary object works like a page that contains a maximum of 50 items of any type.
LINQ/non LINQ answers should be OK, but I prefer LINQ.
LVL 37
Miguel OzSoftware EngineerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Najam UddinCommented:
custs.GroupBy(n => n.ctype, (key, values) => new { ctype = key, Count = values.Count() });

custs is customer collection
ctype is property for customertype
Miguel OzSoftware EngineerAuthor Commented:
Nope, this is not correct it is only counting the number of items and the requirement is to page these objects .
I have already had an answer from SO: ( I can not add the link due to EE policies)
var max=cust.GroupBy(c=>c.CustomerType).Select(c=>c.Count()).Max();
var dict=Enumerable

Open in new window

I will leave this open just in case, you would like to contribute/improve the above query.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Miguel OzSoftware EngineerAuthor Commented:
NO comments after I posted
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.