Narrative:

I detected smoke in cockpit; ran emergency checklist; declared an emergency; and informed ATC that I would be shutting the electrical system down after I made clear my intentions. I then continued after smoke stopped to the closest and suitable airport. I then landed and taxied in with no further issues.

Google
 

Original NASA ASRS Text

Title: A C402 Captain detected smoke in the cockpit. He declared an emergency; notified ATC that he was securing his electrical system; and landed at the nearest suitable airport.

Narrative: I detected smoke in cockpit; ran emergency checklist; declared an emergency; and informed ATC that I would be shutting the electrical system down after I made clear my intentions. I then continued after smoke stopped to the closest and suitable airport. I then landed and taxied in with no further issues.

Data retrieved from NASA's ASRS site as of July 2013 and automatically converted to unabbreviated mixed upper/lowercase text. This report is for informational purposes with no guarantee of accuracy. See NASA's ASRS site for official report.