tags:

views:

41

answers:

2

Using C# how do I know if I am running on a device or emulator? I use the devicename to retrieve data, there will be no data for an emulator; so i will manipulate the emulator name to retrieve data.

+1  A: 

I would think that if it were a REALLY good emulator, your program would never know the difference. ;)

FrustratedWithFormsDesigner
+2  A: 

Since you mentioned the words C# and device in your question I'm assuming you mean a Windows CE or Windows Mobile device. If that is the case the following link will help. It details how to PInvoke the SystemParametersInfo function to determine the OEM name for the device.

https://blogs.msdn.com/netcfteam/archive/2006/09/15/756755.aspx

Just a Bill