George
George

Reputation: 1

Emulator vs Device

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.

Upvotes: 0

Views: 395

Answers (2)

Just a Bill
Just a Bill

Reputation: 281

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

Upvotes: 2

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

Upvotes: 1

Related Questions