In a large pot of boiling salted water, cook the corn for 3 minutes until the starchiness is gone. Drain and immerse it in ice water to stop the cooling and to set the color. When the corn is cool, cut the kernels off the cob, cutting close to the cob.
Toss the kernels in a large bowl with the red onions, vinegar, olive oil, salt and pepper. Just before serving, toss in the fresh basil. Taste for seasoning and serve cold or at room temperature.