(a) A person commits an offense if, knowing that he or she is not licensed or privileged to do so, he or she enters or surreptitiously remains in any building or occupied structure. An offense under this subsection is a misdemeanor if it is committed in a dwelling at night. Otherwise it is a petty misdemeanor.
(b) A person commits an offense if, knowing that he or she is not licensed or privileged to do so, he or she enters or remains in any place as to which notice against trespass is given by:
(1) Actual communication to the actor; or
(2) Posting in a manner prescribed by law or reasonably likely to come to the attention of intruders; or
(3) Fencing or other enclosure manifestly designed to exclude intruders.
(c) An offense under this section constitutes a petty misdemeanor if the offender defies an order to leave personally communicated to him or her by the owner of the premises or other authorized person. Otherwise it is a violation.