问题
Is there a way (using managed code hopefully) to find out if I am running on an Emulator or an actual physical device?
I am looking for something like this:
public class BarcodeScannerFactory
{
public override BarcodeScanner GetBarcodeScanner()
{
if (IsARealDevice()) <---------------------------+
return new SymbolBarcodeScanner(); |
else |
return new FakeBarcodeScanner(); |
} |
} |
|
// This is the method I need to make ----------------+
(NOTE: It occurs to me that Windows Phone 7 has been lumped in with most of the tags below. This question however, is intended for Window Mobile 6.5.)
回答1:
Something along these lines you mean?
来源:https://stackoverflow.com/questions/4504431/am-i-running-on-an-emulator-or-a-device