text: Methylations are commonly performed using electrophilic methyl sources such as iodomethane, dimethyl sulfate, dimethyl carbonate, or tetramethylammonium chloride. Less common but more powerful (and more dangerous) methylating reagents include methyl triflate, diazomethane, and methyl fluorosulfonate (magic methyl). These reagents all react via S2 nucleophilic substitutions. For example, a carboxylate may be methylated on oxygen to give a methyl ester; an alkoxide salt  may be likewise methylated to give an ether, ; or a ketone enolate may be methylated on carbon to produce a new ketone.
  The Purdie methylation is a specific for the methylation at oxygen of carbohydrates using iodomethane and silver oxide.