A knife is defined as a weapon. Weapons are not allowed in a polling place or courthouse, you were entering both.txcharvel wrote:
(7) "Knife" means any bladed hand instrument that is capable of inflicting serious bodily injury or death by cutting or stabbing a person with the instrument.
Sec. 46.03. PLACES WEAPONS PROHIBITED.
(2) on the premises of a polling place on the day of an election or while early voting is in progress;
(3) on the premises of any government court or offices utilized by the court, unless pursuant to written regulations or written authorization of the court;
As to how a person would know, the same way that you and I now know it, we tried it once.