Democratic Sen. Kamala Harris (Calif.) said Thursday that she would not refuse money because it comes from corporations.

A questioner at a town hall in Sacramento, Calif., asked Harris to answer specifically whether her campaign would take money from corporations or corporate lobbyists.

"If a corporation or a corporate lobbyist wants to give you money for a campaign, will you tell them, ‘Thanks, but no thanks’?" a man asked.

"Well, it depends," Harris replied. "It depends."

"Wrong answer," the man said.

Harris defended her answer by saying it was just "not the answer you want to hear," and the moderator credited her for her retort.

Other potential Democratic presidential candidates, including Sens. Cory Booker (N.J.), Kirsten Gillibrand (N.Y.) and Elizabeth Warren (Mass.) have pledged not to take corporate dollars. However, Harris has reportedly courted Hillary Clinton’s big donors, and for now she is still open to taking corporate donations.

She said voters can hold her accountable for the money she takes by checking disclosures and determining whether she was unduly influenced.

"I appreciate the reason that you’re asking it," she said. "And that’s why we have rules that require that any donation that anyone receives needs to be disclosed. So that you can do an assessment and the voters can do an assessment and look at where the contributions come from and make your decisions about whether those contributions have influenced the way that people act and the way that people vote.

"I am an open book there," she added. "Feel free to look at it and then draw your own conclusions about what has motivated me and what hasn’t."