Is there a compilation symbol to detect compact structure?

Is there a compilation symbol to determine if it works on a compact frame platform.

+3
source share
2 answers

You have a gap in your question. You are asking about a compilation symbol, so something exists only at design time and detects a condition at run time. So, the question for you is which one are you really after?

If you want to know at runtime if you are under CF, check the Environment.OSVersion.Platform property to find out not WinCE.

if(Environment.OSVersion.Platform == PlatformID.WinCE)
{
  // this is CF
}

. Wizards Symbols "PocketPC" PPC/WinMo, "WindowsCE" WinCE "WINDOWS_PHONE" Phone7, - :

#if WindowsCE || PocketPC || WINDOWS_PHONE
// this is CF
#endif

, ( ).

+11

:

, #if ?

#if CFNET
// .net CF code
#else
// .net code
#endif

.

0

Source: https://habr.com/ru/post/1741505/


All Articles