Involved in CpXpG DNA methylation. Plays a critical role in the maintenance of CpXpG DNA methylation and suppression of a wide spectrum of transposable element (TE) activities. Required for proper plant development in reproductive stage. a 2'-deoxycytidine in DNA + S-adenosyl-L-methionine = a 5-methyl-2'-deoxycytidine in DNA + H(+) + S-adenosyl-L-homocysteine Down-regulated by salt and dehydration stresses. Reduced overall plant height, early flowering and reduced fertility. Belongs to the class I-like SAM-binding methyltransferase superfamily. C5-methyltransferase family.