نکته شماره 44 :

 

var Max = dg.Rows.Cast()
            .Max(r => Convert.ToInt32(r.Cells["نام ستون"].Value));