The Duchess of Cornwall made a joke about male actors taking female roles at a star-studded society event.

She joined the cream of British broadcasting at an evening to toast the memory of Oscar Wilde.

Camilla joined Dame Maggie Smith, Joanna Lumley and Nicholas Parsons at the reception, where she joked that male actors attempted to take female parts “as if they didn’t have enough good parts of their own”.

The Duchess of Cornwall greets Nicholas Parsons as he is given a birthday cake (Craig Simpson/PA)

At the traditional event marking the 165th birthday of the wit and writer, the duchess raised a toast in a room crammed with more contemporary talent.

Julian Glover, Jeremy Vine, Jennie Bond, David Baddiel and David Mitchell were among those at the gathering at the Grosvenor Hotel in London.

Gyles Brandreth introduced Camilla to Parsons, and she chatted with the presenter as he was given a cake for his 96th birthday.

She then talked with Dame Maggie and other luminaries, before Lumley took to the stage to recite a poem by Irish writer Wilde.

It was then the turn of the duchess to speak, and she was handed a glass of champagne to make the toast.

She said: “It’s lovely to be here again to salute the memory of Oscar Wilde.”

The duchess then joked: “Oscar liked strong women and created quite a few in his plays – including, of course, the infamous Lady Bracknell, a character so interesting that now men want to play her – as if they didn’t have enough good parts of their own.”

Camilla, raising a glass, ended with: “As he put it in De Profundis: ‘With freedom, books, flowers, and the moon, who could not be happy?’

“Ladies and gentlemen, I now ask you to raise your glasses and drink to the memory of the author, playwright and poet Oscar Wilde.”

The event followed Camilla meeting the joint winners of the Booker Prize, Margaret Atwood and Bernardine Evaristo.