Kevin Hart revealed he tested positive for COVID-19 several months ago.

The 41-year-old comedian talked about his diagnosis while performing at Dave Chappelle’s comedy show "An Intimate Socially Distanced Affair" in Yellow Springs, Ohio, on Saturday.

“The problem is that I had it around the same time as Tom Hanks,” Hart said, according to Page Six. “And I couldn’t say anything because he’s more famous than I am.”

KEVIN HART TURNS 41, FEELS 'LUCKY TO BE ALIVE' AFTER CAR ACCIDENT

Chappelle reportedly spent $100,000 on coronavirus rapid testing for the outdoor shows he held over the summer. Other performers included Questlove, Bill Burr and Michelle Wolf.

Meanwhile, Hanks, 64, and his wife, Rita Wilson, confirmed they tested positive for coronavirus on March 11 via Instagram while the actor was making a movie in Australia.

The couple spent time recovering in isolation at a hospital before returning to Los Angeles later that month. They have since donated their plasma to help doctors and scientists find a vaccine.

TOM HANKS DONATES PLASMA AGAIN AFTER RECOVERING FROM THE CORONAVIRUS: 'PLASMATIC!'

Hart has been spending most of his time during quarantine at home in Los Angeles. His wife, Eniko Hart, is expecting their second child together and is due this month. They welcomed son, Kenzo, two years ago.

The Harts just celebrated their baby girl with a boho-chic baby shower. “All things beautiful for baby girl. #ShoweringBabyK #bohochic," Eniko wrote on Instagram.

CLICK HERE TO GET THE FOX NEWS APP

The "Jumanji" star also shares daughter Heaven, 15, and son Hendrix, 12, with his ex-wife, Torrei Hart. They were married from 2003 to 2011.

A rep for Hart did not immediately respond to Fox News' request for comment.