what can be the cause of an check engine light? How can I check? on 2000 BMW 328i

My car has only 79k miles on it. The dealer said that the sensor might be contaminated by oil, but its not even wet with oil.

Asked by for the 2000 BMW 328i
This car has literally hundreds of codes for the check engine light and there are dozens of sensors, not just one that can get oily. So, best to have a good German car shop look at your BMW, this car has more than 30 computers, So unless your are trained, don't mess with it or guess by trying parts. Doing that can ruin things and get very,very expensive!