Unknown solid: NaCl or sugar?

To distinguish between NaCl and sugar, first dissolve the substance in water, then measure the solution's conductivity. If the conductivity is zero, the solid is sugar, since sugar is a non-electrolyte. If the conductivity is non-zero, the solid is sodium chloride, since NaCl is a strong electrolyte.