Tom Hanks is giving credit to the late Fred Rogers, whom the actor says is partly responsible for strengthening his marriage to wife Rita Wilson.

Hanks embodies the iconic children’s TV show host -- who stole the hearts of many through his PBS show, “Mister Rogers’ Neighborhood" -- in the upcoming film, "A Beautiful Day In The Neighborhood."  And through bringing Rogers’ genuine tone to life, the “Sully” star said he has used Rogers’ teachable lessons to resolve disputes in his own marriage to Wilson.

"When my wife and I are going at it on those rare occasions, when she is letting me know that I'm not really listening to her and I'm trying to establish what the ground rules are [for the argument], when we're going at it like that, one of us will say, 'Well, you know what? You know what, honey? It's good to talk. It's good to say the things we feel,'" Hanks, 63, told Entertainment Tonight on Sunday.

'FREDDIE PRINZE Jr. SAYS TOM HANKS WAS SUPPOSED TO PLAY SANDY ON 'FRIENDS': 'HE WASN'T GONNA MAKE IT' IN TIME

Tom Hanks and Rita Wilson attend the 2019 Stagecoach Festival at Empire Polo Field on April 27, 2019 in Indio, California. (Photo by Frazer Harrison/Getty Images for Stagecoach) (Frazer Harrison/Getty Images for Stagecoach)

"And I learned that from Mister Rogers," Hanks said, adding that he and Wilson, 63, “make soup together” if the two of them each have a day off together “and there’s nothing going on.”

“It takes about two to three hours,” Hanks said.

TOM HANKS ON PARTING WITH 'TOY STORY' CHARACTER WOODY: 'IT WAS TERRIBLE'

The actor said that despite the openness and welcoming nature Mister Rogers displayed on a consistent basis, Hanks is sure he and Rogers don’t share many similarities in their personalities but noted that Rogers was willing to stand his ground, if needed.

"I don't allow anyone to take advantage of my good nature and I don't know that Fred did, either," Hanks shared.

"I'm nothing like Fred Rogers in any way, shape, or form," he added. "Except, I think, I wake up in the morning thinking, 'Hey, it's a nice day, it's a good day. Let's try to make it a little bit better.'"

CLICK HERE TO GET THE FOX NEWS APP

Fred Rogers hosted the children’s show “Mister Rogers' Neighborhood” from 1968 to 2001. He died in 2003.

“A Beautiful Day In The Neighborhood” is slated to hit theaters on Nov. 22.