determining the pocket pc/emulator or PC

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello everyone
I wanna determine the type of devices(pocket pc/emulator or PC) by using the precompiler lik
#if
//..
#els
//.

Can I ? How ? I'm using .NET CF , C#
thanks in advance for any hel
 
Determining what device you are running on is something you can only find
out during runtime. To do so you can use OpenNETCF.org's GetSystemInfo
method that is available inside the Smart Device Framework:
http://www.opennetcf.org/PermaLink.aspx?guid=3a013afd-791e-45ef-802a-4c1dbe1cfef9.
On the other hand, if you want to do some specific things for either the
emulator or a PC you can always make your own define if you know beforehand
on which device you will deploy. Determining PC or device would also be
possible during runtime using Environment.OSVersion, but I wonder if that
really helps you.

--
Regards,

Maarten Struys, eMVP
PTS Software bv

www.opennetcf.org | www.dotnetfordevices.com
 
I thought that the C# complier buildin some precomplier definens like "_WIN32_WCE" or someone else
using that we can find out what OS we are using
But Environment.OSVersion is enough
thank you !
 
Back
Top