Using the shift vector method a large class of self-dual lattices of d
imension (l,l) is obtained, which has a one to one correspondence with
modular invariants of free bosonic theory compactified on a coroot la
ttice of a rank l Lie group. Then a large number of modular invariants
of affine Lie algebras are derived explicitly. Two applications of th
is method are a direct derivation of the D series of SU(N) and a new p
roof for the A-D-E classification of the SU(2)(k) partition functions.