Gerorge Bryan Brummel (1778-1840) was and still is known as the dandy par excellence. If he didn't invent dandyism, he did at least define it.
If you don't know what a dandy is, you can easily make your own assumptions from this portrait and probably be quite right:
Straight posture, well-fitting clothes and all the accoutrements of a refined gentleman (top hat, tailcoat, white gloves, glass on a string to look down your nose through, walking-stick and probably a silver caravat pin). Plus, very important, an unbearably arrogant expression (don't you feel like slapping him?) and a small waist. Guess where a dandy got it from. The small waist, I mean. Did they get it by...
So, dandyism is a lifestyle that celebrates elegance, refinement, witty cynicism, and aristoratic elegance. A very expensive lifestyle, no doubt. The movement developed in the mid 18th century, but the early 19th saw its height. This is why we associate top hats and tailcoats with dandies.
And now the solution. Dandies wore corsets. Many men at the time did - in fact, army officers considered it normal to do so.