Alexandria Ocasio-Cortez said she and Paul Ryan were treated very differently when they were elected to Congress, both at about age 28.

The Democratic representative-elect said Ryan was hailed as a "genius" for his policy ideas when he was elected to the House in 1998, while she has been called a "fraud."

Ocasio-Cortez said she was "treated with suspicion & scrutinized, down to my clothing."

She has previously hit back at criticisms of her clothing and said that people in Washington, DC, have mistaken her for an intern.

Alexandria Ocasio-Cortez said on Monday that there were "double standards" in how she and House Speaker Paul Ryan were treated when they were first elected to Congress, even though they were about the same age.

The Democratic representative-elect tweeted that Ryan was hailed as a "genius" for his policy ideas when he was elected to the House in 1998, at age 28, but that she was treated as a "fraud" when she won her New York congressional primary in June, also at 28. (She turned 29 before her election to Congress in November.)

"Double standards are Paul Ryan being elected at 28 and immediately being given the benefit of his ill-considered policies considered genius; and me winning a primary at 28 to immediately be treated with suspicion & scrutinized, down to my clothing, of being a fraud," she wrote.

Ocasio-Cortez was replying to a tweet from Ezra Klein, Vox's editor at large, who shared an article about the increasing federal deficit under Ryan and argued that Ryan had fallen short of his early promises.

Read more: Paul Ryan says one of his biggest regrets is the ballooning federal deficit. The evidence shows he has himself to blame.

A glowing 2012 profile in The New Republic gives a sense of how Ryan was viewed as an up-and-coming lawmaker. In it, Mark Neumann, who vacated the Wisconsin House seat that Ryan went on to win, called Ryan a "unique talent."

"There are very few people who have the ability to understand the math in budgeting and the ability to articulate it," Neumann told Ryan, according to The New Republic. "Those are two skills that don't often go together."

Ocasio-Cortez, a self-described democratic socialist, is the youngest woman ever elected to Congress.

She is considered a rising progressive star in the Democratic Party and has been particularly outspoken in recent weeks as she prepares to become a representative — she has criticized her future colleagues for not paying interns and described the congressional orientation at Harvard for freshman lawmakers as a "lobbyist project."

Read more: Alexandria Ocasio-Cortez slams Harvard orientation for freshman lawmakers as 'lobbyist project' that hypes tax cuts for corporations

She has also hit back at criticisms of her appearance after a conservative writer last month said her clothes looked too nice.

"If I walked into Congress wearing a sack, they would laugh & take a picture of my backside," she tweeted. "If I walk in with my best sale-rack clothes, they laugh & take a picture of my backside."

She also said last month that people on Capitol Hill kept assuming she was an intern.