They will readily cross if they are in bloom at the same time. If you are saving your own seed and want to maintain specific varieties you can stagger your planting
enough to avoid having two different varieties blooming at once. I used to plant my sweet corn side by side with my field corn. The sweet corn was an f1 hybrid that I did not want crossing with my family heirloom field corn. I would plant my sweet corn about three weeks before my field corn. They would both bloom at different times and I would not get any cross pollination between varieties.