score:4

Accepted answer
var columns = table.rows.cast<datarow>()
    .selectmany(row => table.columns.cast<datacolumn>(), (row, column) => new { row, column })
    .where(pair => pair.column.datatype == typeof(string) && !pair.row.isnull(pair.column))
    .groupby(pair => pair.column.columnname, (key, items) => new 
    { 
        columnname = key, 
        maxlength = items.max(x => ((string)x.row[x.column]).length) 
    });

score:1

var columnnames = from column in table.columns.cast<datacolumn>()
                  select new { column.columnname, column.maxlength };

Related Query

More Query from same tag