A class of eukaryotic enzymes that add a methyl group to cytosines in DNA. Methylation of DNA leads to chromatin condensation and is an important means of regulating gene expression in eukaryotes