Max from each group LINQ
===

I have tried every possible way and looked up everywhere. I am in frustration because this is really silly.  I want max from each group. I have below records. 

    ID	Custno  paydt	                 rcvDt	                Mon	   Tue
    17	106505	2009-12-31 00:00:00.000	2012-07-11 07:15:04.523	100	    3
    18	106505	2009-12-31 00:00:00.000	2012-07-11 07:15:04.543	NULL	NULL
    19	106505	2010-12-31 00:00:00.000	2012-07-11 07:15:04.747	3	    3
    20	106505	2011-12-31 00:00:00.000	2012-07-11 07:15:04.827	3	    3

result should be group by Custno and paydt and return with max id

    ID	Custno  paydt	                 rcvDt	                Mon	   Tue
    18	106505	2009-12-31 00:00:00.000	2012-07-11 07:15:04.543	NULL	NULL
    19	106505	2010-12-31 00:00:00.000	2012-07-11 07:15:04.747	3	3
    20	106505	2011-12-31 00:00:00.000	2012-07-11 07:15:04.827	3	3

Tried different way and one of them is below 

 

    var q = from x in MyTable.ToList()
                            group x by new { x.custno, x.paydt } into g
                            select new MyTable
                            {
                                custno= g.Key.custno,
                                paydt= g.Key.paydt,
                                ID = g.Max(b => b.ID),
                                rcvDt = g.OrderByDescending(a => a.ID).First().rcvDt ,
                                mon = g.OrderByDescending(a => a.ID).First().mon,
                                tue = g.OrderByDescending(a => a.ID).First().tue
                            };
will appreciate help!
