Which of the following statements are correct?

Magnesium chloride and magnesium sulfate are ionic compounds.
Methane and carbon dioxide are ionic compounds
An ion that gains an electron has a positive charge.
Ionic compounds have higher melting and boiling points than covalent compounds.