GO:0009008: DNA-methyltransferase activity
Catalysis of the transfer of a methyl group to a DNA molecule.