The nature of the compound formed is crystalline solid due to presence of jonic bond. Since, X= metal and Y= non-metal. When the elements of group-2 (metals) combines with those of group- 17 (non-metals) by the transfer of electrons, an ionic bond is formed and compound formed is likely to be crystalline solid like NaCl.