There are times in which you would want to know whether or not your program is running in the Windows Phone emulator or on a real device. It's easy to determine on which your application is running with a single line of code.
bool IsInEmulator = Microsoft.Devices.Environment.DeviceType == DeviceType.Emulator;
Tags: Windows Phone, Programming