Trespassing

A person commits the crime of first degree criminal trespass if such person knowingly and unlawfully enters or remains in a dwelling of another or if such person enters any motor vehicle with intent to commit a crime. First degree criminal trespass is a felony.

Opening an unlocked door of a car and entering without permission is enough to charge you with second degree criminal trespass. Second degree criminal trespass is a misdemeanor. It is not necessary for the prosecution to prove that you intended to take anything of value from inside the car for you to be found guilty of second degree criminal trespass. Entering the space of any dwelling or car is considered trespassing.

A dwelling encompasses the entire residential structure, including an attached garage.