Candis Cayne. (Getty)

Trans actress Candis Cayne revealed she walked out of an audition for a role on Curb Your Enthusiasm – because of a ‘joke’ about trans women using men’s toilets.

The actress, who is trans and has portrayed characters in Dirty Sexy Money and Elementary, spoke about her experience of the sitcom.

She told the Hollywood Reporter: “I went on an audition for Curb Your Enthusiasm and Larry David was there.

“The part was for a trans woman who had to go to the bathroom really bad and decided she was going to go in the men’s line because it was quicker.

“I said, ‘Thank you for writing a trans part, but I can’t audition because a trans woman wouldn’t do this. I have to honour my community,’ and I walked out of the audition.”

As she was leaving, she added: “But I love the show!”

She added that another well-known trans actress, Alexandra Billings, also walked out of the audition after discovering the content of the role.

The gag was later dropped and did not appear in the show – which last aired in 2011.

Ms Cayne appeared on ABC drama Dirty Sexy Money from 2007 to 2008 – years before trans icon Laverne Cox rose to fame appearing on Orange is the New Black.